revox 0.2.0 → 0.4.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 (208) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +36 -0
  3. data/README.md +38 -38
  4. data/lib/revox/client.rb +8 -0
  5. data/lib/revox/internal/type/base_model.rb +3 -3
  6. data/lib/revox/models/assistant_clone_params.rb +20 -0
  7. data/lib/revox/models/assistant_clone_response.rb +1616 -0
  8. data/lib/revox/models/assistant_create_params.rb +90 -66
  9. data/lib/revox/models/assistant_create_response.rb +87 -65
  10. data/lib/revox/models/assistant_list_response.rb +87 -65
  11. data/lib/revox/models/assistant_retrieve_response.rb +86 -65
  12. data/lib/revox/models/assistant_update_params.rb +90 -66
  13. data/lib/revox/models/assistant_update_response.rb +87 -65
  14. data/lib/revox/models/auth_status_retrieve_params.rb +14 -0
  15. data/lib/revox/models/auth_status_retrieve_response.rb +17 -0
  16. data/lib/revox/models/call_cancel_params.rb +20 -0
  17. data/lib/revox/models/call_cancel_response.rb +16 -0
  18. data/lib/revox/models/call_create_params.rb +117 -90
  19. data/lib/revox/models/call_create_response.rb +680 -90
  20. data/lib/revox/models/call_export_params.rb +203 -0
  21. data/lib/revox/models/call_export_response.rb +22 -0
  22. data/lib/revox/models/call_pause_params.rb +20 -0
  23. data/lib/revox/models/call_pause_response.rb +16 -0
  24. data/lib/revox/models/call_phone_history_params.rb +14 -0
  25. data/lib/revox/models/call_phone_history_response.rb +95 -0
  26. data/lib/revox/models/call_resume_params.rb +20 -0
  27. data/lib/revox/models/call_resume_response.rb +16 -0
  28. data/lib/revox/models/call_retrieve_response.rb +681 -90
  29. data/lib/revox/models/call_search_params.rb +169 -0
  30. data/lib/revox/models/call_search_response.rb +3694 -0
  31. data/lib/revox/models/campaign_create_params.rb +7 -57
  32. data/lib/revox/models/campaign_create_response.rb +108 -119
  33. data/lib/revox/models/campaign_get_rows_response.rb +682 -90
  34. data/lib/revox/models/campaign_list_response.rb +108 -119
  35. data/lib/revox/models/campaign_pause_params.rb +20 -0
  36. data/lib/revox/models/campaign_pause_response.rb +16 -0
  37. data/lib/revox/models/campaign_resume_params.rb +20 -0
  38. data/lib/revox/models/campaign_resume_response.rb +16 -0
  39. data/lib/revox/models/campaign_retrieve_response.rb +108 -119
  40. data/lib/revox/models/campaign_statistics_params.rb +20 -0
  41. data/lib/revox/models/campaign_statistics_response.rb +514 -0
  42. data/lib/revox/models/campaign_update_params.rb +165 -0
  43. data/lib/revox/models/campaign_update_response.rb +2019 -0
  44. data/lib/revox/models/phone_number_delete_params.rb +20 -0
  45. data/lib/revox/models/phone_number_delete_response.rb +16 -0
  46. data/lib/revox/models/phone_number_list_params.rb +14 -0
  47. data/lib/revox/models/phone_number_list_response.rb +1799 -0
  48. data/lib/revox/models/phone_number_update_params.rb +32 -0
  49. data/lib/revox/models/phone_number_update_response.rb +1799 -0
  50. data/lib/revox/models/user_retrieve_params.rb +14 -0
  51. data/lib/revox/models/user_retrieve_response.rb +99 -0
  52. data/lib/revox/models/voice_clone_params.rb +78 -0
  53. data/lib/revox/models/voice_clone_response.rb +40 -0
  54. data/lib/revox/models/voice_delete_params.rb +20 -0
  55. data/lib/revox/models/voice_delete_response.rb +16 -0
  56. data/lib/revox/models/voice_list_response.rb +1 -0
  57. data/lib/revox/models/voice_preview_params.rb +1 -0
  58. data/lib/revox/models/voice_retrieve_params.rb +1 -0
  59. data/lib/revox/models.rb +35 -1
  60. data/lib/revox/resources/assistants.rb +31 -10
  61. data/lib/revox/resources/auth_status.rb +32 -0
  62. data/lib/revox/resources/call.rb +149 -4
  63. data/lib/revox/resources/campaigns.rb +110 -11
  64. data/lib/revox/resources/phone_numbers.rb +74 -0
  65. data/lib/revox/resources/users.rb +17 -3
  66. data/lib/revox/resources/voices.rb +50 -0
  67. data/lib/revox/version.rb +1 -1
  68. data/lib/revox.rb +38 -5
  69. data/rbi/revox/client.rbi +6 -0
  70. data/rbi/revox/models/assistant_clone_params.rbi +33 -0
  71. data/rbi/revox/models/assistant_clone_response.rbi +3351 -0
  72. data/rbi/revox/models/assistant_create_params.rbi +148 -162
  73. data/rbi/revox/models/assistant_create_response.rbi +157 -147
  74. data/rbi/revox/models/assistant_list_response.rbi +157 -147
  75. data/rbi/revox/models/assistant_retrieve_response.rbi +153 -147
  76. data/rbi/revox/models/assistant_update_params.rbi +148 -162
  77. data/rbi/revox/models/assistant_update_response.rbi +157 -147
  78. data/rbi/revox/models/auth_status_retrieve_params.rbi +27 -0
  79. data/rbi/revox/models/auth_status_retrieve_response.rbi +30 -0
  80. data/rbi/revox/models/call_cancel_params.rbi +33 -0
  81. data/rbi/revox/models/call_cancel_response.rbi +23 -0
  82. data/rbi/revox/models/call_create_params.rbi +190 -187
  83. data/rbi/revox/models/call_create_response.rbi +1150 -227
  84. data/rbi/revox/models/call_export_params.rbi +446 -0
  85. data/rbi/revox/models/call_export_response.rbi +26 -0
  86. data/rbi/revox/models/call_pause_params.rbi +31 -0
  87. data/rbi/revox/models/call_pause_response.rbi +23 -0
  88. data/rbi/revox/models/call_phone_history_params.rbi +27 -0
  89. data/rbi/revox/models/call_phone_history_response.rbi +209 -0
  90. data/rbi/revox/models/call_resume_params.rbi +33 -0
  91. data/rbi/revox/models/call_resume_response.rbi +23 -0
  92. data/rbi/revox/models/call_retrieve_response.rbi +1150 -227
  93. data/rbi/revox/models/call_search_params.rbi +281 -0
  94. data/rbi/revox/models/call_search_response.rbi +7504 -0
  95. data/rbi/revox/models/campaign_create_params.rbi +9 -87
  96. data/rbi/revox/models/campaign_create_response.rbi +188 -266
  97. data/rbi/revox/models/campaign_get_rows_response.rbi +1150 -225
  98. data/rbi/revox/models/campaign_list_response.rbi +188 -262
  99. data/rbi/revox/models/campaign_pause_params.rbi +33 -0
  100. data/rbi/revox/models/campaign_pause_response.rbi +23 -0
  101. data/rbi/revox/models/campaign_resume_params.rbi +33 -0
  102. data/rbi/revox/models/campaign_resume_response.rbi +23 -0
  103. data/rbi/revox/models/campaign_retrieve_response.rbi +188 -266
  104. data/rbi/revox/models/campaign_statistics_params.rbi +33 -0
  105. data/rbi/revox/models/campaign_statistics_response.rbi +1069 -0
  106. data/rbi/revox/models/campaign_update_params.rbi +313 -0
  107. data/rbi/revox/models/campaign_update_response.rbi +4092 -0
  108. data/rbi/revox/models/phone_number_delete_params.rbi +33 -0
  109. data/rbi/revox/models/phone_number_delete_response.rbi +26 -0
  110. data/rbi/revox/models/phone_number_list_params.rbi +27 -0
  111. data/rbi/revox/models/phone_number_list_response.rbi +3690 -0
  112. data/rbi/revox/models/phone_number_update_params.rbi +53 -0
  113. data/rbi/revox/models/phone_number_update_response.rbi +3693 -0
  114. data/rbi/revox/models/user_retrieve_params.rbi +27 -0
  115. data/rbi/revox/models/user_retrieve_response.rbi +140 -0
  116. data/rbi/revox/models/voice_clone_params.rbi +141 -0
  117. data/rbi/revox/models/voice_clone_response.rbi +53 -0
  118. data/rbi/revox/models/voice_delete_params.rbi +33 -0
  119. data/rbi/revox/models/voice_delete_response.rbi +23 -0
  120. data/rbi/revox/models/voice_list_response.rbi +5 -0
  121. data/rbi/revox/models/voice_preview_params.rbi +2 -0
  122. data/rbi/revox/models/voice_retrieve_params.rbi +2 -0
  123. data/rbi/revox/models.rbi +35 -1
  124. data/rbi/revox/resources/assistants.rbi +52 -22
  125. data/rbi/revox/resources/auth_status.rbi +21 -0
  126. data/rbi/revox/resources/call.rbi +114 -4
  127. data/rbi/revox/resources/campaigns.rbi +77 -15
  128. data/rbi/revox/resources/phone_numbers.rbi +43 -0
  129. data/rbi/revox/resources/users.rbi +8 -2
  130. data/rbi/revox/resources/voices.rbi +39 -0
  131. data/sig/revox/client.rbs +4 -0
  132. data/sig/revox/models/assistant_clone_params.rbs +20 -0
  133. data/sig/revox/models/assistant_clone_response.rbs +1310 -0
  134. data/sig/revox/models/assistant_create_params.rbs +39 -58
  135. data/sig/revox/models/assistant_create_response.rbs +46 -54
  136. data/sig/revox/models/assistant_list_response.rbs +46 -54
  137. data/sig/revox/models/assistant_retrieve_response.rbs +46 -54
  138. data/sig/revox/models/assistant_update_params.rbs +39 -58
  139. data/sig/revox/models/assistant_update_response.rbs +46 -54
  140. data/sig/revox/models/auth_status_retrieve_params.rbs +15 -0
  141. data/sig/revox/models/auth_status_retrieve_response.rbs +13 -0
  142. data/sig/revox/models/call_cancel_params.rbs +20 -0
  143. data/sig/revox/models/call_cancel_response.rbs +13 -0
  144. data/sig/revox/models/call_create_params.rbs +50 -71
  145. data/sig/revox/models/call_create_response.rbs +473 -77
  146. data/sig/revox/models/call_export_params.rbs +230 -0
  147. data/sig/revox/models/call_export_response.rbs +15 -0
  148. data/sig/revox/models/call_pause_params.rbs +20 -0
  149. data/sig/revox/models/call_pause_response.rbs +13 -0
  150. data/sig/revox/models/call_phone_history_params.rbs +15 -0
  151. data/sig/revox/models/call_phone_history_response.rbs +93 -0
  152. data/sig/revox/models/call_resume_params.rbs +20 -0
  153. data/sig/revox/models/call_resume_response.rbs +13 -0
  154. data/sig/revox/models/call_retrieve_response.rbs +473 -77
  155. data/sig/revox/models/call_search_params.rbs +194 -0
  156. data/sig/revox/models/call_search_response.rbs +3045 -0
  157. data/sig/revox/models/campaign_create_params.rbs +5 -50
  158. data/sig/revox/models/campaign_create_response.rbs +62 -98
  159. data/sig/revox/models/campaign_get_rows_response.rbs +472 -73
  160. data/sig/revox/models/campaign_list_response.rbs +62 -98
  161. data/sig/revox/models/campaign_pause_params.rbs +20 -0
  162. data/sig/revox/models/campaign_pause_response.rbs +13 -0
  163. data/sig/revox/models/campaign_resume_params.rbs +20 -0
  164. data/sig/revox/models/campaign_resume_response.rbs +13 -0
  165. data/sig/revox/models/campaign_retrieve_response.rbs +62 -98
  166. data/sig/revox/models/campaign_statistics_params.rbs +20 -0
  167. data/sig/revox/models/campaign_statistics_response.rbs +489 -0
  168. data/sig/revox/models/campaign_update_params.rbs +135 -0
  169. data/sig/revox/models/campaign_update_response.rbs +1658 -0
  170. data/sig/revox/models/phone_number_delete_params.rbs +20 -0
  171. data/sig/revox/models/phone_number_delete_response.rbs +13 -0
  172. data/sig/revox/models/phone_number_list_params.rbs +15 -0
  173. data/sig/revox/models/phone_number_list_response.rbs +1454 -0
  174. data/sig/revox/models/phone_number_update_params.rbs +32 -0
  175. data/sig/revox/models/phone_number_update_response.rbs +1452 -0
  176. data/sig/revox/models/user_retrieve_params.rbs +14 -0
  177. data/sig/revox/models/user_retrieve_response.rbs +71 -0
  178. data/sig/revox/models/voice_clone_params.rbs +79 -0
  179. data/sig/revox/models/voice_clone_response.rbs +40 -0
  180. data/sig/revox/models/voice_delete_params.rbs +20 -0
  181. data/sig/revox/models/voice_delete_response.rbs +13 -0
  182. data/sig/revox/models/voice_list_response.rbs +2 -1
  183. data/sig/revox/models/voice_preview_params.rbs +2 -1
  184. data/sig/revox/models/voice_retrieve_params.rbs +2 -1
  185. data/sig/revox/models.rbs +35 -1
  186. data/sig/revox/resources/assistants.rbs +9 -4
  187. data/sig/revox/resources/auth_status.rbs +11 -0
  188. data/sig/revox/resources/call.rbs +46 -1
  189. data/sig/revox/resources/campaigns.rbs +24 -3
  190. data/sig/revox/resources/phone_numbers.rbs +23 -0
  191. data/sig/revox/resources/users.rbs +3 -1
  192. data/sig/revox/resources/voices.rbs +13 -0
  193. metadata +116 -17
  194. data/lib/revox/models/users/me_retrieve_params.rb +0 -16
  195. data/lib/revox/models/users/me_retrieve_response.rb +0 -101
  196. data/lib/revox/models/users/me_update_params.rb +0 -22
  197. data/lib/revox/models/users/me_update_response.rb +0 -101
  198. data/lib/revox/resources/users/me.rb +0 -55
  199. data/rbi/revox/models/users/me_retrieve_params.rbi +0 -29
  200. data/rbi/revox/models/users/me_retrieve_response.rbi +0 -149
  201. data/rbi/revox/models/users/me_update_params.rbi +0 -43
  202. data/rbi/revox/models/users/me_update_response.rbi +0 -149
  203. data/rbi/revox/resources/users/me.rbi +0 -33
  204. data/sig/revox/models/users/me_retrieve_params.rbs +0 -16
  205. data/sig/revox/models/users/me_retrieve_response.rbs +0 -75
  206. data/sig/revox/models/users/me_update_params.rbs +0 -28
  207. data/sig/revox/models/users/me_update_response.rbs +0 -75
  208. data/sig/revox/resources/users/me.rbs +0 -18
@@ -163,6 +163,14 @@ module Revox
163
163
  # @return [Object]
164
164
  required :updated_at, Revox::Internal::Type::Unknown
165
165
 
166
+ # @!attribute follow_up_emails
167
+ # Extra notification recipients resolved from the agent prompt's own routing
168
+ # rules, when it defines any. Added to the assistant's configured notification
169
+ # recipients; never replaces them. Null when the prompt defines no routing rules.
170
+ #
171
+ # @return [Array<String>, nil]
172
+ optional :follow_up_emails, Revox::Internal::Type::ArrayOf[String], nil?: true
173
+
166
174
  # @!attribute outcome
167
175
  # Business outcome of the call. Null if not computed or no transcript.
168
176
  #
@@ -175,7 +183,16 @@ module Revox
175
183
  # @return [String, nil]
176
184
  optional :outcome_summary, String, nil?: true
177
185
 
178
- # @!method initialize(id:, assignee:, assistant:, call_attempts:, call_retry_config:, calls_count:, campaign:, contact:, created_at:, direction:, first_sentence_delay_ms:, from_phone_number:, is_cancelled:, is_completed:, last_call_attempt:, llm_model:, metadata:, organization_id:, prompt_variables:, scheduled_at:, status:, to_phone_number:, updated_at:, outcome: nil, outcome_summary: nil)
186
+ # @!attribute slack_channel_ids
187
+ # Slack channels resolved from the agent prompt's own routing rules, when it
188
+ # defines any. Always a subset of the channels configured on the assistant. Null
189
+ # when the prompt defines no routing rules, in which case every configured channel
190
+ # is notified.
191
+ #
192
+ # @return [Array<String>, nil]
193
+ optional :slack_channel_ids, Revox::Internal::Type::ArrayOf[String], nil?: true
194
+
195
+ # @!method initialize(id:, assignee:, assistant:, call_attempts:, call_retry_config:, calls_count:, campaign:, contact:, created_at:, direction:, first_sentence_delay_ms:, from_phone_number:, is_cancelled:, is_completed:, last_call_attempt:, llm_model:, metadata:, organization_id:, prompt_variables:, scheduled_at:, status:, to_phone_number:, updated_at:, follow_up_emails: nil, outcome: nil, outcome_summary: nil, slack_channel_ids: nil)
179
196
  # Some parameter documentations has been truncated, see
180
197
  # {Revox::Models::CallCreateResponse::Call} for more details.
181
198
  #
@@ -228,9 +245,13 @@ module Revox
228
245
  #
229
246
  # @param updated_at [Object] The time the call order was last updated (any state change, retry, or analysis r
230
247
  #
248
+ # @param follow_up_emails [Array<String>, nil] Extra notification recipients resolved from the agent prompt's own routing rules
249
+ #
231
250
  # @param outcome [Symbol, Revox::Models::CallCreateResponse::Call::Outcome, nil] Business outcome of the call. Null if not computed or no transcript.
232
251
  #
233
252
  # @param outcome_summary [String, nil] LLM explanation for the outcome, when outcome was computed from the transcript.
253
+ #
254
+ # @param slack_channel_ids [Array<String>, nil] Slack channels resolved from the agent prompt's own routing rules, when it defin
234
255
 
235
256
  # @see Revox::Models::CallCreateResponse::Call#assignee
236
257
  class Assignee < Revox::Internal::Type::BaseModel
@@ -344,13 +365,6 @@ module Revox
344
365
  # @return [String, nil]
345
366
  required :email_notification_address, String, nil?: true
346
367
 
347
- # @!attribute email_notification_language
348
- # The language used for the notification email content. One of "en" or "fr".
349
- #
350
- # @return [Symbol, Revox::Models::CallCreateResponse::Call::Assistant::EmailNotificationLanguage]
351
- required :email_notification_language,
352
- enum: -> { Revox::Models::CallCreateResponse::Call::Assistant::EmailNotificationLanguage }
353
-
354
368
  # @!attribute email_notification_outcomes
355
369
  # Which call outcomes trigger an email notification. E.g. ["interested",
356
370
  # "completed", "none"]. Use "none" when outcome is null.
@@ -390,8 +404,8 @@ module Revox
390
404
  required :from_phone_number, String, nil?: true
391
405
 
392
406
  # @!attribute human_transfer_mode
393
- # Warm or cold transfer when transfer_phone_number is set; null when transfer is
394
- # not configured.
407
+ # Warm or cold transfer when transfer_destinations is non-empty; null when
408
+ # transfer is not configured.
395
409
  #
396
410
  # @return [Symbol, Revox::Models::CallCreateResponse::Call::Assistant::HumanTransferMode, nil]
397
411
  required :human_transfer_mode,
@@ -447,6 +461,13 @@ module Revox
447
461
  # @return [Revox::Models::CallCreateResponse::Call::Assistant::Position, nil]
448
462
  required :position, -> { Revox::Models::CallCreateResponse::Call::Assistant::Position }, nil?: true
449
463
 
464
+ # @!attribute precall_lookup_url
465
+ # URL fetched before an inbound call is answered to resolve the assistant's prompt
466
+ # variables. Null when no lookup is configured.
467
+ #
468
+ # @return [String, nil]
469
+ required :precall_lookup_url, String, nil?: true
470
+
450
471
  # @!attribute prompt
451
472
  #
452
473
  # @return [String]
@@ -530,11 +551,14 @@ module Revox
530
551
  # @return [Float]
531
552
  required :thinking_sound_volume, Float
532
553
 
533
- # @!attribute transfer_phone_number
534
- # Phone number to transfer calls to when users request to speak to a human agent.
554
+ # @!attribute transfer_destinations
555
+ # Where calls can be transferred to when users ask to speak to a human. Null or
556
+ # empty when transfer is not configured.
535
557
  #
536
- # @return [String, nil]
537
- required :transfer_phone_number, String, nil?: true
558
+ # @return [Array<Revox::Models::CallCreateResponse::Call::Assistant::TransferDestination>, nil]
559
+ required :transfer_destinations,
560
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CallCreateResponse::Call::Assistant::TransferDestination] },
561
+ nil?: true
538
562
 
539
563
  # @!attribute type
540
564
  #
@@ -595,6 +619,11 @@ module Revox
595
619
  optional :faq_items,
596
620
  -> { Revox::Internal::Type::ArrayOf[Revox::Models::CallCreateResponse::Call::Assistant::FaqItem] }
597
621
 
622
+ # @!attribute is_inbound_receptionist
623
+ #
624
+ # @return [Boolean, nil]
625
+ optional :is_inbound_receptionist, Revox::Internal::Type::Boolean
626
+
598
627
  # @!attribute is_realestate_assistant
599
628
  #
600
629
  # @return [Boolean, nil]
@@ -605,7 +634,7 @@ module Revox
605
634
  # @return [Float, nil]
606
635
  optional :pending_faq_count, Float
607
636
 
608
- # @!method initialize(id:, after_call_sms_outcomes:, after_call_sms_prompt:, background_sound:, background_sound_volume:, calendly:, call_retry_config:, cartesia_dictionary_pronunciation_id:, created_at:, custom_tools:, email_notification_address:, email_notification_language:, email_notification_outcomes:, end_of_call_sentence:, first_sentence:, first_sentence_delay_ms:, first_sentence_mode:, from_phone_number:, human_transfer_mode:, ivr_navigation_enabled:, llm_model:, logo_url:, max_call_duration_secs:, max_duration_end_message:, name:, organization_id:, position:, prompt:, prompt_flow:, slack:, sms_enabled:, sms_template:, structured_output_config:, structured_output_prompt:, stt_context:, stt_model:, thinking_sound:, thinking_sound_probability:, thinking_sound_volume:, transfer_phone_number:, type:, updated_at:, voice:, voicemail_message:, voicemail_sms_prompt:, warm_transfer_summary_instructions:, webhook_url:, zoho:, created_by: nil, faq_items: nil, is_realestate_assistant: nil, pending_faq_count: nil)
637
+ # @!method initialize(id:, after_call_sms_outcomes:, after_call_sms_prompt:, background_sound:, background_sound_volume:, calendly:, call_retry_config:, cartesia_dictionary_pronunciation_id:, created_at:, custom_tools:, email_notification_address:, email_notification_outcomes:, end_of_call_sentence:, first_sentence:, first_sentence_delay_ms:, first_sentence_mode:, from_phone_number:, human_transfer_mode:, ivr_navigation_enabled:, llm_model:, logo_url:, max_call_duration_secs:, max_duration_end_message:, name:, organization_id:, position:, precall_lookup_url:, prompt:, prompt_flow:, slack:, sms_enabled:, sms_template:, structured_output_config:, structured_output_prompt:, stt_context:, stt_model:, thinking_sound:, thinking_sound_probability:, thinking_sound_volume:, transfer_destinations:, type:, updated_at:, voice:, voicemail_message:, voicemail_sms_prompt:, warm_transfer_summary_instructions:, webhook_url:, zoho:, created_by: nil, faq_items: nil, is_inbound_receptionist: nil, is_realestate_assistant: nil, pending_faq_count: nil)
609
638
  # Some parameter documentations has been truncated, see
610
639
  # {Revox::Models::CallCreateResponse::Call::Assistant} for more details.
611
640
  #
@@ -631,8 +660,6 @@ module Revox
631
660
  #
632
661
  # @param email_notification_address [String, nil] Email address(es) to receive notifications when a call ends with a matching outc
633
662
  #
634
- # @param email_notification_language [Symbol, Revox::Models::CallCreateResponse::Call::Assistant::EmailNotificationLanguage] The language used for the notification email content. One of "en" or "fr".
635
- #
636
663
  # @param email_notification_outcomes [Array<Symbol, Revox::Models::CallCreateResponse::Call::Assistant::EmailNotificationOutcome>, nil] Which call outcomes trigger an email notification. E.g. ["interested", "complete
637
664
  #
638
665
  # @param end_of_call_sentence [String, nil]
@@ -645,7 +672,7 @@ module Revox
645
672
  #
646
673
  # @param from_phone_number [String, nil] Override the default outbound phone number for calls placed with this assistant.
647
674
  #
648
- # @param human_transfer_mode [Symbol, Revox::Models::CallCreateResponse::Call::Assistant::HumanTransferMode, nil] Warm or cold transfer when transfer_phone_number is set; null when transfer is n
675
+ # @param human_transfer_mode [Symbol, Revox::Models::CallCreateResponse::Call::Assistant::HumanTransferMode, nil] Warm or cold transfer when transfer_destinations is non-empty; null when transfe
649
676
  #
650
677
  # @param ivr_navigation_enabled [Boolean] Enable IVR navigation tools. When enabled, the assistant can send DTMF tones and
651
678
  #
@@ -663,6 +690,8 @@ module Revox
663
690
  #
664
691
  # @param position [Revox::Models::CallCreateResponse::Call::Assistant::Position, nil]
665
692
  #
693
+ # @param precall_lookup_url [String, nil] URL fetched before an inbound call is answered to resolve the assistant's prompt
694
+ #
666
695
  # @param prompt [String]
667
696
  #
668
697
  # @param prompt_flow [Revox::Models::CallCreateResponse::Call::Assistant::PromptFlow, nil]
@@ -687,7 +716,7 @@ module Revox
687
716
  #
688
717
  # @param thinking_sound_volume [Float] Volume of the thinking sound (0 = silent, 1 = max).
689
718
  #
690
- # @param transfer_phone_number [String, nil] Phone number to transfer calls to when users request to speak to a human agent.
719
+ # @param transfer_destinations [Array<Revox::Models::CallCreateResponse::Call::Assistant::TransferDestination>, nil] Where calls can be transferred to when users ask to speak to a human. Null or em
691
720
  #
692
721
  # @param type [Symbol, Revox::Models::CallCreateResponse::Call::Assistant::Type]
693
722
  #
@@ -709,6 +738,8 @@ module Revox
709
738
  #
710
739
  # @param faq_items [Array<Revox::Models::CallCreateResponse::Call::Assistant::FaqItem>]
711
740
  #
741
+ # @param is_inbound_receptionist [Boolean]
742
+ #
712
743
  # @param is_realestate_assistant [Boolean]
713
744
  #
714
745
  # @param pending_faq_count [Float]
@@ -720,9 +751,6 @@ module Revox
720
751
  INTERESTED = :interested
721
752
  COMPLETED = :completed
722
753
  REQUESTED_CALLBACK_LATER = :requested_callback_later
723
- REQUESTED_CALLBACK_NEW_NUMBER = :requested_callback_new_number
724
- DO_NOT_CONTACT = :do_not_contact
725
- AI_AVERSE = :ai_averse
726
754
  NONE = :none
727
755
 
728
756
  # @!method self.values
@@ -855,7 +883,8 @@ module Revox
855
883
  required :calling_window_start_time, String
856
884
 
857
885
  # @!attribute retry_delay_seconds
858
- # Delay between retry attempts in seconds. Default: 7200 (2 hours).
886
+ # Delay between retry attempts in seconds. 0 retries as soon as the calling window
887
+ # allows. Default: 7200 (2 hours).
859
888
  #
860
889
  # @return [Integer]
861
890
  required :retry_delay_seconds, Integer
@@ -869,7 +898,7 @@ module Revox
869
898
  #
870
899
  # @param calling_window_start_time [String] Start time for the calling window in the recipient's timezone (or timezone_overr
871
900
  #
872
- # @param retry_delay_seconds [Integer] Delay between retry attempts in seconds. Default: 7200 (2 hours).
901
+ # @param retry_delay_seconds [Integer] Delay between retry attempts in seconds. 0 retries as soon as the calling window
873
902
  end
874
903
  end
875
904
 
@@ -1052,19 +1081,6 @@ module Revox
1052
1081
  end
1053
1082
  end
1054
1083
 
1055
- # The language used for the notification email content. One of "en" or "fr".
1056
- #
1057
- # @see Revox::Models::CallCreateResponse::Call::Assistant#email_notification_language
1058
- module EmailNotificationLanguage
1059
- extend Revox::Internal::Type::Enum
1060
-
1061
- EN = :en
1062
- FR = :fr
1063
-
1064
- # @!method self.values
1065
- # @return [Array<Symbol>]
1066
- end
1067
-
1068
1084
  module EmailNotificationOutcome
1069
1085
  extend Revox::Internal::Type::Enum
1070
1086
 
@@ -1072,9 +1088,6 @@ module Revox
1072
1088
  INTERESTED = :interested
1073
1089
  COMPLETED = :completed
1074
1090
  REQUESTED_CALLBACK_LATER = :requested_callback_later
1075
- REQUESTED_CALLBACK_NEW_NUMBER = :requested_callback_new_number
1076
- DO_NOT_CONTACT = :do_not_contact
1077
- AI_AVERSE = :ai_averse
1078
1091
  NONE = :none
1079
1092
 
1080
1093
  # @!method self.values
@@ -1093,8 +1106,8 @@ module Revox
1093
1106
  # @return [Array<Symbol>]
1094
1107
  end
1095
1108
 
1096
- # Warm or cold transfer when transfer_phone_number is set; null when transfer is
1097
- # not configured.
1109
+ # Warm or cold transfer when transfer_destinations is non-empty; null when
1110
+ # transfer is not configured.
1098
1111
  #
1099
1112
  # @see Revox::Models::CallCreateResponse::Call::Assistant#human_transfer_mode
1100
1113
  module HumanTransferMode
@@ -1384,11 +1397,14 @@ module Revox
1384
1397
 
1385
1398
  # @see Revox::Models::CallCreateResponse::Call::Assistant#slack
1386
1399
  class Slack < Revox::Internal::Type::BaseModel
1387
- # @!attribute channel_id
1388
- # The Slack channel ID where the notification will be posted.
1400
+ # @!attribute channels
1401
+ # The Slack channels eligible to receive the notification. When more than one is
1402
+ # configured, the agent prompt may define routing rules to narrow it down per
1403
+ # call; with no such rules every channel here is notified.
1389
1404
  #
1390
- # @return [String]
1391
- required :channel_id, String
1405
+ # @return [Array<Revox::Models::CallCreateResponse::Call::Assistant::Slack::Channel>]
1406
+ required :channels,
1407
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CallCreateResponse::Call::Assistant::Slack::Channel] }
1392
1408
 
1393
1409
  # @!attribute connection_id
1394
1410
  # The Nango connection ID linking the org's Slack workspace to Revox.
@@ -1404,37 +1420,53 @@ module Revox
1404
1420
  required :outcomes,
1405
1421
  -> { Revox::Internal::Type::ArrayOf[enum: Revox::Models::CallCreateResponse::Call::Assistant::Slack::Outcome] }
1406
1422
 
1407
- # @!attribute channel_name
1408
- # Human-readable Slack channel name, cached for display in the UI.
1409
- #
1410
- # @return [String, nil]
1411
- optional :channel_name, String, nil?: true
1412
-
1413
1423
  # @!attribute template
1414
1424
  # Optional message template. Supports {{summary}}, {{outcome}}, {{phone}},
1415
1425
  # {{call_url}}, {{assistant_name}}, {{campaign_name}}, {{first_name}},
1416
- # {{last_name}}, {{email}}, {{company}}, {{contact_name}}, {{contact_line}}, plus
1417
- # prompt_variables and structured_output keys. When null/empty a default template
1418
- # is used.
1426
+ # {{last_name}}, {{email}}, {{company}}, {{job_title}}, {{contact_name}},
1427
+ # {{contact_line}}, plus prompt_variables and structured_output keys. When
1428
+ # null/empty a default template is used.
1419
1429
  #
1420
1430
  # @return [String, nil]
1421
1431
  optional :template, String, nil?: true
1422
1432
 
1423
- # @!method initialize(channel_id:, connection_id:, outcomes:, channel_name: nil, template: nil)
1433
+ # @!method initialize(channels:, connection_id:, outcomes:, template: nil)
1424
1434
  # Some parameter documentations has been truncated, see
1425
1435
  # {Revox::Models::CallCreateResponse::Call::Assistant::Slack} for more details.
1426
1436
  #
1427
- # @param channel_id [String] The Slack channel ID where the notification will be posted.
1437
+ # @param channels [Array<Revox::Models::CallCreateResponse::Call::Assistant::Slack::Channel>] The Slack channels eligible to receive the notification. When more than one is c
1428
1438
  #
1429
1439
  # @param connection_id [String] The Nango connection ID linking the org's Slack workspace to Revox.
1430
1440
  #
1431
1441
  # @param outcomes [Array<Symbol, Revox::Models::CallCreateResponse::Call::Assistant::Slack::Outcome>] Which call outcomes trigger a Slack notification (e.g. ['interested', 'none']).
1432
1442
  #
1433
- # @param channel_name [String, nil] Human-readable Slack channel name, cached for display in the UI.
1434
- #
1435
1443
  # @param template [String, nil] Optional message template. Supports {{summary}}, {{outcome}}, {{phone}},
1436
1444
  # {{call\_
1437
1445
 
1446
+ class Channel < Revox::Internal::Type::BaseModel
1447
+ # @!attribute id
1448
+ # The Slack channel ID (e.g. 'C01234567').
1449
+ #
1450
+ # @return [String]
1451
+ required :id, String
1452
+
1453
+ # @!attribute name
1454
+ # Human-readable Slack channel name, cached for display in the UI and given to the
1455
+ # LLM when the agent prompt routes by channel name.
1456
+ #
1457
+ # @return [String, nil]
1458
+ optional :name, String, nil?: true
1459
+
1460
+ # @!method initialize(id:, name: nil)
1461
+ # Some parameter documentations has been truncated, see
1462
+ # {Revox::Models::CallCreateResponse::Call::Assistant::Slack::Channel} for more
1463
+ # details.
1464
+ #
1465
+ # @param id [String] The Slack channel ID (e.g. 'C01234567').
1466
+ #
1467
+ # @param name [String, nil] Human-readable Slack channel name, cached for display in the UI and given to the
1468
+ end
1469
+
1438
1470
  module Outcome
1439
1471
  extend Revox::Internal::Type::Enum
1440
1472
 
@@ -1442,9 +1474,6 @@ module Revox
1442
1474
  INTERESTED = :interested
1443
1475
  COMPLETED = :completed
1444
1476
  REQUESTED_CALLBACK_LATER = :requested_callback_later
1445
- REQUESTED_CALLBACK_NEW_NUMBER = :requested_callback_new_number
1446
- DO_NOT_CONTACT = :do_not_contact
1447
- AI_AVERSE = :ai_averse
1448
1477
  NONE = :none
1449
1478
 
1450
1479
  # @!method self.values
@@ -1572,6 +1601,22 @@ module Revox
1572
1601
  # @return [Array<Symbol>]
1573
1602
  end
1574
1603
 
1604
+ class TransferDestination < Revox::Internal::Type::BaseModel
1605
+ # @!attribute label
1606
+ #
1607
+ # @return [String]
1608
+ required :label, String
1609
+
1610
+ # @!attribute phone_number
1611
+ #
1612
+ # @return [String]
1613
+ required :phone_number, String
1614
+
1615
+ # @!method initialize(label:, phone_number:)
1616
+ # @param label [String]
1617
+ # @param phone_number [String]
1618
+ end
1619
+
1575
1620
  # @see Revox::Models::CallCreateResponse::Call::Assistant#type
1576
1621
  module Type
1577
1622
  extend Revox::Internal::Type::Enum
@@ -1607,7 +1652,7 @@ module Revox
1607
1652
 
1608
1653
  # @!attribute speed
1609
1654
  # The speed of the voice. Range depends on provider: Cartesia 0.6–1.5, ElevenLabs
1610
- # 0.7–1.2. Default is 1.0.
1655
+ # 0.7–1.2, Gradium 0.6–1.5. Default is 1.0.
1611
1656
  #
1612
1657
  # @return [Float, nil]
1613
1658
  optional :speed, Float
@@ -1641,6 +1686,7 @@ module Revox
1641
1686
 
1642
1687
  CARTESIA = :cartesia
1643
1688
  ELEVENLABS = :elevenlabs
1689
+ GRADIUM = :gradium
1644
1690
 
1645
1691
  # @!method self.values
1646
1692
  # @return [Array<Symbol>]
@@ -1755,9 +1801,6 @@ module Revox
1755
1801
  INTERESTED = :interested
1756
1802
  COMPLETED = :completed
1757
1803
  REQUESTED_CALLBACK_LATER = :requested_callback_later
1758
- REQUESTED_CALLBACK_NEW_NUMBER = :requested_callback_new_number
1759
- DO_NOT_CONTACT = :do_not_contact
1760
- AI_AVERSE = :ai_averse
1761
1804
  NONE = :none
1762
1805
 
1763
1806
  # @!method self.values
@@ -1873,6 +1916,29 @@ module Revox
1873
1916
  # @return [Object]
1874
1917
  required :ended_at, Revox::Internal::Type::Unknown
1875
1918
 
1919
+ # @!attribute handled_by_ai
1920
+ # Whether the AI agent conducted the conversation on this attempt. False for a
1921
+ # silent speed-dial probe (whose agent only detects a human) and for attempts that
1922
+ # were never answered.
1923
+ #
1924
+ # @return [Boolean]
1925
+ required :handled_by_ai, Revox::Internal::Type::Boolean
1926
+
1927
+ # @!attribute handled_by_human
1928
+ # Whether a human operator conducted (part of) this attempt — a jump-in takeover
1929
+ # or a speed-dial operator connection (both stamp human_takeover_at).
1930
+ #
1931
+ # @return [Boolean]
1932
+ required :handled_by_human, Revox::Internal::Type::Boolean
1933
+
1934
+ # @!attribute handled_by_user
1935
+ # The team member responsible for following up on this call.
1936
+ #
1937
+ # @return [Revox::Models::CallCreateResponse::Call::CallAttempt::HandledByUser, nil]
1938
+ required :handled_by_user,
1939
+ -> { Revox::Models::CallCreateResponse::Call::CallAttempt::HandledByUser },
1940
+ nil?: true
1941
+
1876
1942
  # @!attribute phone_number
1877
1943
  # The phone number that was called. Formatted in E.164 format. Example:
1878
1944
  # +1234567890
@@ -1909,6 +1975,15 @@ module Revox
1909
1975
  # @return [Array<String>, nil]
1910
1976
  optional :assistants_used, Revox::Internal::Type::ArrayOf[String], nil?: true
1911
1977
 
1978
+ # @!attribute email_log
1979
+ # Notification emails sent in connection with the call, ordered oldest first
1980
+ # (from/to addresses, subject, sent time).
1981
+ #
1982
+ # @return [Array<Revox::Models::CallCreateResponse::Call::CallAttempt::EmailLog>, nil]
1983
+ optional :email_log,
1984
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CallCreateResponse::Call::CallAttempt::EmailLog] },
1985
+ nil?: true
1986
+
1912
1987
  # @!attribute end_reason
1913
1988
  # Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call',
1914
1989
  # 'voicemail', 'transfer', 'ivr_no_navigate'.
@@ -1944,6 +2019,16 @@ module Revox
1944
2019
  -> { Revox::Internal::Type::ArrayOf[Revox::Models::CallCreateResponse::Call::CallAttempt::SMSLog] },
1945
2020
  nil?: true
1946
2021
 
2022
+ # @!attribute speech_events
2023
+ # Per-turn speech segments (VAD-derived) with timing and pipeline latencies,
2024
+ # ordered by started_speaking_at_ms. Empty for calls recorded before this was
2025
+ # tracked or for realtime sessions that don't emit them.
2026
+ #
2027
+ # @return [Array<Revox::Models::CallCreateResponse::Call::CallAttempt::SpeechEvent>, nil]
2028
+ optional :speech_events,
2029
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CallCreateResponse::Call::CallAttempt::SpeechEvent] },
2030
+ nil?: true
2031
+
1947
2032
  # @!attribute structured_output
1948
2033
  # The data extracted from the call, using the structured output config from the
1949
2034
  # parent call object.
@@ -1961,7 +2046,7 @@ module Revox
1961
2046
  -> { Revox::Internal::Type::ArrayOf[Revox::Models::CallCreateResponse::Call::CallAttempt::Transcript] },
1962
2047
  nil?: true
1963
2048
 
1964
- # @!method initialize(id:, answered_at:, dial_error:, ended_at:, phone_number:, recording_url:, result:, started_at:, status:, assistants_used: nil, end_reason: nil, ended_by: nil, post_call_transcript: nil, sms_log: nil, structured_output: nil, transcript: nil)
2049
+ # @!method initialize(id:, answered_at:, dial_error:, ended_at:, handled_by_ai:, handled_by_human:, handled_by_user:, phone_number:, recording_url:, result:, started_at:, status:, assistants_used: nil, email_log: nil, end_reason: nil, ended_by: nil, post_call_transcript: nil, sms_log: nil, speech_events: nil, structured_output: nil, transcript: nil)
1965
2050
  # Some parameter documentations has been truncated, see
1966
2051
  # {Revox::Models::CallCreateResponse::Call::CallAttempt} for more details.
1967
2052
  #
@@ -1976,6 +2061,12 @@ module Revox
1976
2061
  #
1977
2062
  # @param ended_at [Object] The time the call ended.
1978
2063
  #
2064
+ # @param handled_by_ai [Boolean] Whether the AI agent conducted the conversation on this attempt. False for a sil
2065
+ #
2066
+ # @param handled_by_human [Boolean] Whether a human operator conducted (part of) this attempt — a jump-in takeover o
2067
+ #
2068
+ # @param handled_by_user [Revox::Models::CallCreateResponse::Call::CallAttempt::HandledByUser, nil] The team member responsible for following up on this call.
2069
+ #
1979
2070
  # @param phone_number [String] The phone number that was called. Formatted in E.164 format. Example: +123456789
1980
2071
  #
1981
2072
  # @param recording_url [String, nil] The URL of the audio recording of the call.
@@ -1988,6 +2079,8 @@ module Revox
1988
2079
  #
1989
2080
  # @param assistants_used [Array<String>, nil] Assistant node ids entered during this attempt, in traversal order.
1990
2081
  #
2082
+ # @param email_log [Array<Revox::Models::CallCreateResponse::Call::CallAttempt::EmailLog>, nil] Notification emails sent in connection with the call, ordered oldest first (from
2083
+ #
1991
2084
  # @param end_reason [Symbol, Revox::Models::CallCreateResponse::Call::CallAttempt::EndReason, nil] Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call', 'voic
1992
2085
  #
1993
2086
  # @param ended_by [Symbol, Revox::Models::CallCreateResponse::Call::CallAttempt::EndedBy, nil] Who ended the call: 'agent' (AI agent), 'user' (caller/callee hung up), or 'syst
@@ -1996,6 +2089,8 @@ module Revox
1996
2089
  #
1997
2090
  # @param sms_log [Array<Revox::Models::CallCreateResponse::Call::CallAttempt::SMSLog>, nil] Automatic SMS sent after the call (voicemail and after-call), ordered oldest fir
1998
2091
  #
2092
+ # @param speech_events [Array<Revox::Models::CallCreateResponse::Call::CallAttempt::SpeechEvent>, nil] Per-turn speech segments (VAD-derived) with timing and pipeline latencies, order
2093
+ #
1999
2094
  # @param structured_output [Hash{Symbol=>Object}, nil] The data extracted from the call, using the structured output config from the pa
2000
2095
  #
2001
2096
  # @param transcript [Array<Revox::Models::CallCreateResponse::Call::CallAttempt::Transcript>, nil] The live transcript of the call, built in real time.
@@ -2019,6 +2114,41 @@ module Revox
2019
2114
  # @return [Array<Symbol>]
2020
2115
  end
2021
2116
 
2117
+ # @see Revox::Models::CallCreateResponse::Call::CallAttempt#handled_by_user
2118
+ class HandledByUser < Revox::Internal::Type::BaseModel
2119
+ # @!attribute id
2120
+ # The database user id of the assignee.
2121
+ #
2122
+ # @return [String]
2123
+ required :id, String
2124
+
2125
+ # @!attribute email
2126
+ #
2127
+ # @return [String]
2128
+ required :email, String
2129
+
2130
+ # @!attribute first_name
2131
+ #
2132
+ # @return [String, nil]
2133
+ required :first_name, String, nil?: true
2134
+
2135
+ # @!attribute last_name
2136
+ #
2137
+ # @return [String, nil]
2138
+ required :last_name, String, nil?: true
2139
+
2140
+ # @!method initialize(id:, email:, first_name:, last_name:)
2141
+ # The team member responsible for following up on this call.
2142
+ #
2143
+ # @param id [String] The database user id of the assignee.
2144
+ #
2145
+ # @param email [String]
2146
+ #
2147
+ # @param first_name [String, nil]
2148
+ #
2149
+ # @param last_name [String, nil]
2150
+ end
2151
+
2022
2152
  # @see Revox::Models::CallCreateResponse::Call::CallAttempt#result
2023
2153
  module Result
2024
2154
  extend Revox::Internal::Type::Enum
@@ -2049,6 +2179,52 @@ module Revox
2049
2179
  # @return [Array<Symbol>]
2050
2180
  end
2051
2181
 
2182
+ class EmailLog < Revox::Internal::Type::BaseModel
2183
+ # @!attribute id
2184
+ #
2185
+ # @return [String]
2186
+ required :id, String
2187
+
2188
+ # @!attribute created_at
2189
+ # When the email was sent.
2190
+ #
2191
+ # @return [Object]
2192
+ required :created_at, Revox::Internal::Type::Unknown
2193
+
2194
+ # @!attribute from_address
2195
+ #
2196
+ # @return [String]
2197
+ required :from_address, String
2198
+
2199
+ # @!attribute resend_message_id
2200
+ #
2201
+ # @return [String, nil]
2202
+ required :resend_message_id, String, nil?: true
2203
+
2204
+ # @!attribute subject
2205
+ #
2206
+ # @return [String]
2207
+ required :subject, String
2208
+
2209
+ # @!attribute to_emails
2210
+ #
2211
+ # @return [Array<String>]
2212
+ required :to_emails, Revox::Internal::Type::ArrayOf[String]
2213
+
2214
+ # @!method initialize(id:, created_at:, from_address:, resend_message_id:, subject:, to_emails:)
2215
+ # @param id [String]
2216
+ #
2217
+ # @param created_at [Object] When the email was sent.
2218
+ #
2219
+ # @param from_address [String]
2220
+ #
2221
+ # @param resend_message_id [String, nil]
2222
+ #
2223
+ # @param subject [String]
2224
+ #
2225
+ # @param to_emails [Array<String>]
2226
+ end
2227
+
2052
2228
  # Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call',
2053
2229
  # 'voicemail', 'transfer', 'ivr_no_navigate'.
2054
2230
  #
@@ -2179,34 +2355,52 @@ module Revox
2179
2355
  # @return [String]
2180
2356
  required :message_body, String
2181
2357
 
2182
- # @!attribute to_phone_number
2358
+ # @!attribute provider
2183
2359
  #
2184
- # @return [String]
2185
- required :to_phone_number, String
2360
+ # @return [Symbol, Revox::Models::CallCreateResponse::Call::CallAttempt::SMSLog::Provider]
2361
+ required :provider, enum: -> { Revox::Models::CallCreateResponse::Call::CallAttempt::SMSLog::Provider }
2186
2362
 
2187
- # @!attribute twilio_message_sid
2363
+ # @!attribute provider_message_id
2188
2364
  #
2189
2365
  # @return [String, nil]
2190
- required :twilio_message_sid, String, nil?: true
2366
+ required :provider_message_id, String, nil?: true
2367
+
2368
+ # @!attribute to_phone_number
2369
+ #
2370
+ # @return [String]
2371
+ required :to_phone_number, String
2191
2372
 
2192
2373
  # @!attribute type
2193
2374
  #
2194
2375
  # @return [Symbol, Revox::Models::CallCreateResponse::Call::CallAttempt::SMSLog::Type]
2195
2376
  required :type, enum: -> { Revox::Models::CallCreateResponse::Call::CallAttempt::SMSLog::Type }
2196
2377
 
2197
- # @!method initialize(id:, created_at:, message_body:, to_phone_number:, twilio_message_sid:, type:)
2378
+ # @!method initialize(id:, created_at:, message_body:, provider:, provider_message_id:, to_phone_number:, type:)
2198
2379
  # @param id [String]
2199
2380
  #
2200
2381
  # @param created_at [Object] When the SMS was sent.
2201
2382
  #
2202
2383
  # @param message_body [String]
2203
2384
  #
2204
- # @param to_phone_number [String]
2385
+ # @param provider [Symbol, Revox::Models::CallCreateResponse::Call::CallAttempt::SMSLog::Provider]
2205
2386
  #
2206
- # @param twilio_message_sid [String, nil]
2387
+ # @param provider_message_id [String, nil]
2388
+ #
2389
+ # @param to_phone_number [String]
2207
2390
  #
2208
2391
  # @param type [Symbol, Revox::Models::CallCreateResponse::Call::CallAttempt::SMSLog::Type]
2209
2392
 
2393
+ # @see Revox::Models::CallCreateResponse::Call::CallAttempt::SMSLog#provider
2394
+ module Provider
2395
+ extend Revox::Internal::Type::Enum
2396
+
2397
+ TWILIO = :twilio
2398
+ VONAGE = :vonage
2399
+
2400
+ # @!method self.values
2401
+ # @return [Array<Symbol>]
2402
+ end
2403
+
2210
2404
  # @see Revox::Models::CallCreateResponse::Call::CallAttempt::SMSLog#type
2211
2405
  module Type
2212
2406
  extend Revox::Internal::Type::Enum
@@ -2220,6 +2414,125 @@ module Revox
2220
2414
  end
2221
2415
  end
2222
2416
 
2417
+ class SpeechEvent < Revox::Internal::Type::BaseModel
2418
+ # @!attribute id
2419
+ #
2420
+ # @return [String]
2421
+ required :id, String
2422
+
2423
+ # @!attribute is_real_turn
2424
+ # False when the segment was flagged as noise/blip rather than a meaningful turn.
2425
+ #
2426
+ # @return [Boolean]
2427
+ required :is_real_turn, Revox::Internal::Type::Boolean
2428
+
2429
+ # @!attribute llm_system_prompt
2430
+ # Agent-only: despite the name, the whole prompt the LLM was given for this turn —
2431
+ # system instructions plus conversation history — as JSON.
2432
+ #
2433
+ # @return [String, nil]
2434
+ required :llm_system_prompt, String, nil?: true
2435
+
2436
+ # @!attribute llm_ttft_ms
2437
+ # Agent-only: LLM time-to-first-token for the reply, in ms.
2438
+ #
2439
+ # @return [Float, nil]
2440
+ required :llm_ttft_ms, Float, nil?: true
2441
+
2442
+ # @!attribute llm_winner_model
2443
+ # Agent-only: the model that produced the reply — the winning leg when the LLM is
2444
+ # a race, which is also the model `llm_ttft_ms` describes.
2445
+ #
2446
+ # @return [String, nil]
2447
+ required :llm_winner_model, String, nil?: true
2448
+
2449
+ # @!attribute speaker
2450
+ # Who was speaking during this segment.
2451
+ #
2452
+ # @return [Symbol, Revox::Models::CallCreateResponse::Call::CallAttempt::SpeechEvent::Speaker]
2453
+ required :speaker, enum: -> { Revox::Models::CallCreateResponse::Call::CallAttempt::SpeechEvent::Speaker }
2454
+
2455
+ # @!attribute started_speaking_at_ms
2456
+ # Milliseconds since session start when speech began.
2457
+ #
2458
+ # @return [Float]
2459
+ required :started_speaking_at_ms, Float
2460
+
2461
+ # @!attribute stopped_speaking_at_ms
2462
+ # Milliseconds since session start when speech ended. Null when the session ended
2463
+ # before the turn closed.
2464
+ #
2465
+ # @return [Float, nil]
2466
+ required :stopped_speaking_at_ms, Float, nil?: true
2467
+
2468
+ # @!attribute stt_transcription_delay_ms
2469
+ # User-only: time from end-of-speech to final transcript, in ms.
2470
+ #
2471
+ # @return [Float, nil]
2472
+ required :stt_transcription_delay_ms, Float, nil?: true
2473
+
2474
+ # @!attribute transcript
2475
+ # Recognized text for this segment, when available.
2476
+ #
2477
+ # @return [String, nil]
2478
+ required :transcript, String, nil?: true
2479
+
2480
+ # @!attribute tts_ttfb_ms
2481
+ # Agent-only: TTS time-to-first-audio-byte for the reply, in ms.
2482
+ #
2483
+ # @return [Float, nil]
2484
+ required :tts_ttfb_ms, Float, nil?: true
2485
+
2486
+ # @!attribute was_cut
2487
+ # Agent-only: true when the agent's audio was interrupted (real or auto-resumed).
2488
+ # Null on user segments.
2489
+ #
2490
+ # @return [Boolean, nil]
2491
+ required :was_cut, Revox::Internal::Type::Boolean, nil?: true
2492
+
2493
+ # @!method initialize(id:, is_real_turn:, llm_system_prompt:, llm_ttft_ms:, llm_winner_model:, speaker:, started_speaking_at_ms:, stopped_speaking_at_ms:, stt_transcription_delay_ms:, transcript:, tts_ttfb_ms:, was_cut:)
2494
+ # Some parameter documentations has been truncated, see
2495
+ # {Revox::Models::CallCreateResponse::Call::CallAttempt::SpeechEvent} for more
2496
+ # details.
2497
+ #
2498
+ # @param id [String]
2499
+ #
2500
+ # @param is_real_turn [Boolean] False when the segment was flagged as noise/blip rather than a meaningful turn.
2501
+ #
2502
+ # @param llm_system_prompt [String, nil] Agent-only: despite the name, the whole prompt the LLM was given for this turn —
2503
+ #
2504
+ # @param llm_ttft_ms [Float, nil] Agent-only: LLM time-to-first-token for the reply, in ms.
2505
+ #
2506
+ # @param llm_winner_model [String, nil] Agent-only: the model that produced the reply — the winning leg when the LLM is
2507
+ #
2508
+ # @param speaker [Symbol, Revox::Models::CallCreateResponse::Call::CallAttempt::SpeechEvent::Speaker] Who was speaking during this segment.
2509
+ #
2510
+ # @param started_speaking_at_ms [Float] Milliseconds since session start when speech began.
2511
+ #
2512
+ # @param stopped_speaking_at_ms [Float, nil] Milliseconds since session start when speech ended. Null when the session ended
2513
+ #
2514
+ # @param stt_transcription_delay_ms [Float, nil] User-only: time from end-of-speech to final transcript, in ms.
2515
+ #
2516
+ # @param transcript [String, nil] Recognized text for this segment, when available.
2517
+ #
2518
+ # @param tts_ttfb_ms [Float, nil] Agent-only: TTS time-to-first-audio-byte for the reply, in ms.
2519
+ #
2520
+ # @param was_cut [Boolean, nil] Agent-only: true when the agent's audio was interrupted (real or auto-resumed).
2521
+
2522
+ # Who was speaking during this segment.
2523
+ #
2524
+ # @see Revox::Models::CallCreateResponse::Call::CallAttempt::SpeechEvent#speaker
2525
+ module Speaker
2526
+ extend Revox::Internal::Type::Enum
2527
+
2528
+ USER = :user
2529
+ AGENT = :agent
2530
+
2531
+ # @!method self.values
2532
+ # @return [Array<Symbol>]
2533
+ end
2534
+ end
2535
+
2223
2536
  class Transcript < Revox::Internal::Type::BaseModel
2224
2537
  # @!attribute content
2225
2538
  #
@@ -2379,7 +2692,8 @@ module Revox
2379
2692
  required :calling_window_start_time, String
2380
2693
 
2381
2694
  # @!attribute retry_delay_seconds
2382
- # Delay between retry attempts in seconds. Default: 7200 (2 hours).
2695
+ # Delay between retry attempts in seconds. 0 retries as soon as the calling window
2696
+ # allows. Default: 7200 (2 hours).
2383
2697
  #
2384
2698
  # @return [Integer]
2385
2699
  required :retry_delay_seconds, Integer
@@ -2393,7 +2707,7 @@ module Revox
2393
2707
  #
2394
2708
  # @param calling_window_start_time [String] Start time for the calling window in the recipient's timezone (or timezone_overr
2395
2709
  #
2396
- # @param retry_delay_seconds [Integer] Delay between retry attempts in seconds. Default: 7200 (2 hours).
2710
+ # @param retry_delay_seconds [Integer] Delay between retry attempts in seconds. 0 retries as soon as the calling window
2397
2711
  end
2398
2712
  end
2399
2713
 
@@ -2431,18 +2745,24 @@ module Revox
2431
2745
  # @return [String, nil]
2432
2746
  required :first_name, String, nil?: true
2433
2747
 
2748
+ # @!attribute job_title
2749
+ #
2750
+ # @return [String, nil]
2751
+ required :job_title, String, nil?: true
2752
+
2434
2753
  # @!attribute last_name
2435
2754
  #
2436
2755
  # @return [String, nil]
2437
2756
  required :last_name, String, nil?: true
2438
2757
 
2439
- # @!method initialize(company:, email:, first_name:, last_name:)
2758
+ # @!method initialize(company:, email:, first_name:, job_title:, last_name:)
2440
2759
  # Magic contact variables (prospect identity) extracted from the call's input data
2441
2760
  # and transcript.
2442
2761
  #
2443
2762
  # @param company [String, nil]
2444
2763
  # @param email [String, nil]
2445
2764
  # @param first_name [String, nil]
2765
+ # @param job_title [String, nil]
2446
2766
  # @param last_name [String, nil]
2447
2767
  end
2448
2768
 
@@ -2487,6 +2807,29 @@ module Revox
2487
2807
  # @return [Object]
2488
2808
  required :ended_at, Revox::Internal::Type::Unknown
2489
2809
 
2810
+ # @!attribute handled_by_ai
2811
+ # Whether the AI agent conducted the conversation on this attempt. False for a
2812
+ # silent speed-dial probe (whose agent only detects a human) and for attempts that
2813
+ # were never answered.
2814
+ #
2815
+ # @return [Boolean]
2816
+ required :handled_by_ai, Revox::Internal::Type::Boolean
2817
+
2818
+ # @!attribute handled_by_human
2819
+ # Whether a human operator conducted (part of) this attempt — a jump-in takeover
2820
+ # or a speed-dial operator connection (both stamp human_takeover_at).
2821
+ #
2822
+ # @return [Boolean]
2823
+ required :handled_by_human, Revox::Internal::Type::Boolean
2824
+
2825
+ # @!attribute handled_by_user
2826
+ # The team member responsible for following up on this call.
2827
+ #
2828
+ # @return [Revox::Models::CallCreateResponse::Call::LastCallAttempt::HandledByUser, nil]
2829
+ required :handled_by_user,
2830
+ -> { Revox::Models::CallCreateResponse::Call::LastCallAttempt::HandledByUser },
2831
+ nil?: true
2832
+
2490
2833
  # @!attribute phone_number
2491
2834
  # The phone number that was called. Formatted in E.164 format. Example:
2492
2835
  # +1234567890
@@ -2525,6 +2868,15 @@ module Revox
2525
2868
  # @return [Array<String>, nil]
2526
2869
  optional :assistants_used, Revox::Internal::Type::ArrayOf[String], nil?: true
2527
2870
 
2871
+ # @!attribute email_log
2872
+ # Notification emails sent in connection with the call, ordered oldest first
2873
+ # (from/to addresses, subject, sent time).
2874
+ #
2875
+ # @return [Array<Revox::Models::CallCreateResponse::Call::LastCallAttempt::EmailLog>, nil]
2876
+ optional :email_log,
2877
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CallCreateResponse::Call::LastCallAttempt::EmailLog] },
2878
+ nil?: true
2879
+
2528
2880
  # @!attribute end_reason
2529
2881
  # Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call',
2530
2882
  # 'voicemail', 'transfer', 'ivr_no_navigate'.
@@ -2562,6 +2914,16 @@ module Revox
2562
2914
  -> { Revox::Internal::Type::ArrayOf[Revox::Models::CallCreateResponse::Call::LastCallAttempt::SMSLog] },
2563
2915
  nil?: true
2564
2916
 
2917
+ # @!attribute speech_events
2918
+ # Per-turn speech segments (VAD-derived) with timing and pipeline latencies,
2919
+ # ordered by started_speaking_at_ms. Empty for calls recorded before this was
2920
+ # tracked or for realtime sessions that don't emit them.
2921
+ #
2922
+ # @return [Array<Revox::Models::CallCreateResponse::Call::LastCallAttempt::SpeechEvent>, nil]
2923
+ optional :speech_events,
2924
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CallCreateResponse::Call::LastCallAttempt::SpeechEvent] },
2925
+ nil?: true
2926
+
2565
2927
  # @!attribute structured_output
2566
2928
  # The data extracted from the call, using the structured output config from the
2567
2929
  # parent call object.
@@ -2579,7 +2941,7 @@ module Revox
2579
2941
  -> { Revox::Internal::Type::ArrayOf[Revox::Models::CallCreateResponse::Call::LastCallAttempt::Transcript] },
2580
2942
  nil?: true
2581
2943
 
2582
- # @!method initialize(id:, answered_at:, dial_error:, ended_at:, phone_number:, recording_url:, result:, started_at:, status:, assistants_used: nil, end_reason: nil, ended_by: nil, post_call_transcript: nil, sms_log: nil, structured_output: nil, transcript: nil)
2944
+ # @!method initialize(id:, answered_at:, dial_error:, ended_at:, handled_by_ai:, handled_by_human:, handled_by_user:, phone_number:, recording_url:, result:, started_at:, status:, assistants_used: nil, email_log: nil, end_reason: nil, ended_by: nil, post_call_transcript: nil, sms_log: nil, speech_events: nil, structured_output: nil, transcript: nil)
2583
2945
  # Some parameter documentations has been truncated, see
2584
2946
  # {Revox::Models::CallCreateResponse::Call::LastCallAttempt} for more details.
2585
2947
  #
@@ -2594,6 +2956,12 @@ module Revox
2594
2956
  #
2595
2957
  # @param ended_at [Object] The time the call ended.
2596
2958
  #
2959
+ # @param handled_by_ai [Boolean] Whether the AI agent conducted the conversation on this attempt. False for a sil
2960
+ #
2961
+ # @param handled_by_human [Boolean] Whether a human operator conducted (part of) this attempt — a jump-in takeover o
2962
+ #
2963
+ # @param handled_by_user [Revox::Models::CallCreateResponse::Call::LastCallAttempt::HandledByUser, nil] The team member responsible for following up on this call.
2964
+ #
2597
2965
  # @param phone_number [String] The phone number that was called. Formatted in E.164 format. Example: +123456789
2598
2966
  #
2599
2967
  # @param recording_url [String, nil] The URL of the audio recording of the call.
@@ -2606,6 +2974,8 @@ module Revox
2606
2974
  #
2607
2975
  # @param assistants_used [Array<String>, nil] Assistant node ids entered during this attempt, in traversal order.
2608
2976
  #
2977
+ # @param email_log [Array<Revox::Models::CallCreateResponse::Call::LastCallAttempt::EmailLog>, nil] Notification emails sent in connection with the call, ordered oldest first (from
2978
+ #
2609
2979
  # @param end_reason [Symbol, Revox::Models::CallCreateResponse::Call::LastCallAttempt::EndReason, nil] Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call', 'voic
2610
2980
  #
2611
2981
  # @param ended_by [Symbol, Revox::Models::CallCreateResponse::Call::LastCallAttempt::EndedBy, nil] Who ended the call: 'agent' (AI agent), 'user' (caller/callee hung up), or 'syst
@@ -2614,6 +2984,8 @@ module Revox
2614
2984
  #
2615
2985
  # @param sms_log [Array<Revox::Models::CallCreateResponse::Call::LastCallAttempt::SMSLog>, nil] Automatic SMS sent after the call (voicemail and after-call), ordered oldest fir
2616
2986
  #
2987
+ # @param speech_events [Array<Revox::Models::CallCreateResponse::Call::LastCallAttempt::SpeechEvent>, nil] Per-turn speech segments (VAD-derived) with timing and pipeline latencies, order
2988
+ #
2617
2989
  # @param structured_output [Hash{Symbol=>Object}, nil] The data extracted from the call, using the structured output config from the pa
2618
2990
  #
2619
2991
  # @param transcript [Array<Revox::Models::CallCreateResponse::Call::LastCallAttempt::Transcript>, nil] The live transcript of the call, built in real time.
@@ -2637,6 +3009,41 @@ module Revox
2637
3009
  # @return [Array<Symbol>]
2638
3010
  end
2639
3011
 
3012
+ # @see Revox::Models::CallCreateResponse::Call::LastCallAttempt#handled_by_user
3013
+ class HandledByUser < Revox::Internal::Type::BaseModel
3014
+ # @!attribute id
3015
+ # The database user id of the assignee.
3016
+ #
3017
+ # @return [String]
3018
+ required :id, String
3019
+
3020
+ # @!attribute email
3021
+ #
3022
+ # @return [String]
3023
+ required :email, String
3024
+
3025
+ # @!attribute first_name
3026
+ #
3027
+ # @return [String, nil]
3028
+ required :first_name, String, nil?: true
3029
+
3030
+ # @!attribute last_name
3031
+ #
3032
+ # @return [String, nil]
3033
+ required :last_name, String, nil?: true
3034
+
3035
+ # @!method initialize(id:, email:, first_name:, last_name:)
3036
+ # The team member responsible for following up on this call.
3037
+ #
3038
+ # @param id [String] The database user id of the assignee.
3039
+ #
3040
+ # @param email [String]
3041
+ #
3042
+ # @param first_name [String, nil]
3043
+ #
3044
+ # @param last_name [String, nil]
3045
+ end
3046
+
2640
3047
  # @see Revox::Models::CallCreateResponse::Call::LastCallAttempt#result
2641
3048
  module Result
2642
3049
  extend Revox::Internal::Type::Enum
@@ -2667,6 +3074,52 @@ module Revox
2667
3074
  # @return [Array<Symbol>]
2668
3075
  end
2669
3076
 
3077
+ class EmailLog < Revox::Internal::Type::BaseModel
3078
+ # @!attribute id
3079
+ #
3080
+ # @return [String]
3081
+ required :id, String
3082
+
3083
+ # @!attribute created_at
3084
+ # When the email was sent.
3085
+ #
3086
+ # @return [Object]
3087
+ required :created_at, Revox::Internal::Type::Unknown
3088
+
3089
+ # @!attribute from_address
3090
+ #
3091
+ # @return [String]
3092
+ required :from_address, String
3093
+
3094
+ # @!attribute resend_message_id
3095
+ #
3096
+ # @return [String, nil]
3097
+ required :resend_message_id, String, nil?: true
3098
+
3099
+ # @!attribute subject
3100
+ #
3101
+ # @return [String]
3102
+ required :subject, String
3103
+
3104
+ # @!attribute to_emails
3105
+ #
3106
+ # @return [Array<String>]
3107
+ required :to_emails, Revox::Internal::Type::ArrayOf[String]
3108
+
3109
+ # @!method initialize(id:, created_at:, from_address:, resend_message_id:, subject:, to_emails:)
3110
+ # @param id [String]
3111
+ #
3112
+ # @param created_at [Object] When the email was sent.
3113
+ #
3114
+ # @param from_address [String]
3115
+ #
3116
+ # @param resend_message_id [String, nil]
3117
+ #
3118
+ # @param subject [String]
3119
+ #
3120
+ # @param to_emails [Array<String>]
3121
+ end
3122
+
2670
3123
  # Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call',
2671
3124
  # 'voicemail', 'transfer', 'ivr_no_navigate'.
2672
3125
  #
@@ -2797,34 +3250,53 @@ module Revox
2797
3250
  # @return [String]
2798
3251
  required :message_body, String
2799
3252
 
2800
- # @!attribute to_phone_number
3253
+ # @!attribute provider
2801
3254
  #
2802
- # @return [String]
2803
- required :to_phone_number, String
3255
+ # @return [Symbol, Revox::Models::CallCreateResponse::Call::LastCallAttempt::SMSLog::Provider]
3256
+ required :provider,
3257
+ enum: -> { Revox::Models::CallCreateResponse::Call::LastCallAttempt::SMSLog::Provider }
2804
3258
 
2805
- # @!attribute twilio_message_sid
3259
+ # @!attribute provider_message_id
2806
3260
  #
2807
3261
  # @return [String, nil]
2808
- required :twilio_message_sid, String, nil?: true
3262
+ required :provider_message_id, String, nil?: true
3263
+
3264
+ # @!attribute to_phone_number
3265
+ #
3266
+ # @return [String]
3267
+ required :to_phone_number, String
2809
3268
 
2810
3269
  # @!attribute type
2811
3270
  #
2812
3271
  # @return [Symbol, Revox::Models::CallCreateResponse::Call::LastCallAttempt::SMSLog::Type]
2813
3272
  required :type, enum: -> { Revox::Models::CallCreateResponse::Call::LastCallAttempt::SMSLog::Type }
2814
3273
 
2815
- # @!method initialize(id:, created_at:, message_body:, to_phone_number:, twilio_message_sid:, type:)
3274
+ # @!method initialize(id:, created_at:, message_body:, provider:, provider_message_id:, to_phone_number:, type:)
2816
3275
  # @param id [String]
2817
3276
  #
2818
3277
  # @param created_at [Object] When the SMS was sent.
2819
3278
  #
2820
3279
  # @param message_body [String]
2821
3280
  #
2822
- # @param to_phone_number [String]
3281
+ # @param provider [Symbol, Revox::Models::CallCreateResponse::Call::LastCallAttempt::SMSLog::Provider]
3282
+ #
3283
+ # @param provider_message_id [String, nil]
2823
3284
  #
2824
- # @param twilio_message_sid [String, nil]
3285
+ # @param to_phone_number [String]
2825
3286
  #
2826
3287
  # @param type [Symbol, Revox::Models::CallCreateResponse::Call::LastCallAttempt::SMSLog::Type]
2827
3288
 
3289
+ # @see Revox::Models::CallCreateResponse::Call::LastCallAttempt::SMSLog#provider
3290
+ module Provider
3291
+ extend Revox::Internal::Type::Enum
3292
+
3293
+ TWILIO = :twilio
3294
+ VONAGE = :vonage
3295
+
3296
+ # @!method self.values
3297
+ # @return [Array<Symbol>]
3298
+ end
3299
+
2828
3300
  # @see Revox::Models::CallCreateResponse::Call::LastCallAttempt::SMSLog#type
2829
3301
  module Type
2830
3302
  extend Revox::Internal::Type::Enum
@@ -2838,6 +3310,126 @@ module Revox
2838
3310
  end
2839
3311
  end
2840
3312
 
3313
+ class SpeechEvent < Revox::Internal::Type::BaseModel
3314
+ # @!attribute id
3315
+ #
3316
+ # @return [String]
3317
+ required :id, String
3318
+
3319
+ # @!attribute is_real_turn
3320
+ # False when the segment was flagged as noise/blip rather than a meaningful turn.
3321
+ #
3322
+ # @return [Boolean]
3323
+ required :is_real_turn, Revox::Internal::Type::Boolean
3324
+
3325
+ # @!attribute llm_system_prompt
3326
+ # Agent-only: despite the name, the whole prompt the LLM was given for this turn —
3327
+ # system instructions plus conversation history — as JSON.
3328
+ #
3329
+ # @return [String, nil]
3330
+ required :llm_system_prompt, String, nil?: true
3331
+
3332
+ # @!attribute llm_ttft_ms
3333
+ # Agent-only: LLM time-to-first-token for the reply, in ms.
3334
+ #
3335
+ # @return [Float, nil]
3336
+ required :llm_ttft_ms, Float, nil?: true
3337
+
3338
+ # @!attribute llm_winner_model
3339
+ # Agent-only: the model that produced the reply — the winning leg when the LLM is
3340
+ # a race, which is also the model `llm_ttft_ms` describes.
3341
+ #
3342
+ # @return [String, nil]
3343
+ required :llm_winner_model, String, nil?: true
3344
+
3345
+ # @!attribute speaker
3346
+ # Who was speaking during this segment.
3347
+ #
3348
+ # @return [Symbol, Revox::Models::CallCreateResponse::Call::LastCallAttempt::SpeechEvent::Speaker]
3349
+ required :speaker,
3350
+ enum: -> { Revox::Models::CallCreateResponse::Call::LastCallAttempt::SpeechEvent::Speaker }
3351
+
3352
+ # @!attribute started_speaking_at_ms
3353
+ # Milliseconds since session start when speech began.
3354
+ #
3355
+ # @return [Float]
3356
+ required :started_speaking_at_ms, Float
3357
+
3358
+ # @!attribute stopped_speaking_at_ms
3359
+ # Milliseconds since session start when speech ended. Null when the session ended
3360
+ # before the turn closed.
3361
+ #
3362
+ # @return [Float, nil]
3363
+ required :stopped_speaking_at_ms, Float, nil?: true
3364
+
3365
+ # @!attribute stt_transcription_delay_ms
3366
+ # User-only: time from end-of-speech to final transcript, in ms.
3367
+ #
3368
+ # @return [Float, nil]
3369
+ required :stt_transcription_delay_ms, Float, nil?: true
3370
+
3371
+ # @!attribute transcript
3372
+ # Recognized text for this segment, when available.
3373
+ #
3374
+ # @return [String, nil]
3375
+ required :transcript, String, nil?: true
3376
+
3377
+ # @!attribute tts_ttfb_ms
3378
+ # Agent-only: TTS time-to-first-audio-byte for the reply, in ms.
3379
+ #
3380
+ # @return [Float, nil]
3381
+ required :tts_ttfb_ms, Float, nil?: true
3382
+
3383
+ # @!attribute was_cut
3384
+ # Agent-only: true when the agent's audio was interrupted (real or auto-resumed).
3385
+ # Null on user segments.
3386
+ #
3387
+ # @return [Boolean, nil]
3388
+ required :was_cut, Revox::Internal::Type::Boolean, nil?: true
3389
+
3390
+ # @!method initialize(id:, is_real_turn:, llm_system_prompt:, llm_ttft_ms:, llm_winner_model:, speaker:, started_speaking_at_ms:, stopped_speaking_at_ms:, stt_transcription_delay_ms:, transcript:, tts_ttfb_ms:, was_cut:)
3391
+ # Some parameter documentations has been truncated, see
3392
+ # {Revox::Models::CallCreateResponse::Call::LastCallAttempt::SpeechEvent} for more
3393
+ # details.
3394
+ #
3395
+ # @param id [String]
3396
+ #
3397
+ # @param is_real_turn [Boolean] False when the segment was flagged as noise/blip rather than a meaningful turn.
3398
+ #
3399
+ # @param llm_system_prompt [String, nil] Agent-only: despite the name, the whole prompt the LLM was given for this turn —
3400
+ #
3401
+ # @param llm_ttft_ms [Float, nil] Agent-only: LLM time-to-first-token for the reply, in ms.
3402
+ #
3403
+ # @param llm_winner_model [String, nil] Agent-only: the model that produced the reply — the winning leg when the LLM is
3404
+ #
3405
+ # @param speaker [Symbol, Revox::Models::CallCreateResponse::Call::LastCallAttempt::SpeechEvent::Speaker] Who was speaking during this segment.
3406
+ #
3407
+ # @param started_speaking_at_ms [Float] Milliseconds since session start when speech began.
3408
+ #
3409
+ # @param stopped_speaking_at_ms [Float, nil] Milliseconds since session start when speech ended. Null when the session ended
3410
+ #
3411
+ # @param stt_transcription_delay_ms [Float, nil] User-only: time from end-of-speech to final transcript, in ms.
3412
+ #
3413
+ # @param transcript [String, nil] Recognized text for this segment, when available.
3414
+ #
3415
+ # @param tts_ttfb_ms [Float, nil] Agent-only: TTS time-to-first-audio-byte for the reply, in ms.
3416
+ #
3417
+ # @param was_cut [Boolean, nil] Agent-only: true when the agent's audio was interrupted (real or auto-resumed).
3418
+
3419
+ # Who was speaking during this segment.
3420
+ #
3421
+ # @see Revox::Models::CallCreateResponse::Call::LastCallAttempt::SpeechEvent#speaker
3422
+ module Speaker
3423
+ extend Revox::Internal::Type::Enum
3424
+
3425
+ USER = :user
3426
+ AGENT = :agent
3427
+
3428
+ # @!method self.values
3429
+ # @return [Array<Symbol>]
3430
+ end
3431
+ end
3432
+
2841
3433
  class Transcript < Revox::Internal::Type::BaseModel
2842
3434
  # @!attribute content
2843
3435
  #
@@ -3071,6 +3663,7 @@ module Revox
3071
3663
  QUEUED_FOR_CALLING = :queued_for_calling
3072
3664
  CALLING = :calling
3073
3665
  POST_PROCESSING = :post_processing
3666
+ NOT_LAUNCHED = :not_launched
3074
3667
  SCHEDULED = :scheduled
3075
3668
  PAUSED = :paused
3076
3669
  COMPLETED = :completed
@@ -3091,9 +3684,6 @@ module Revox
3091
3684
  INTERESTED = :interested
3092
3685
  COMPLETED = :completed
3093
3686
  REQUESTED_CALLBACK_LATER = :requested_callback_later
3094
- REQUESTED_CALLBACK_NEW_NUMBER = :requested_callback_new_number
3095
- DO_NOT_CONTACT = :do_not_contact
3096
- AI_AVERSE = :ai_averse
3097
3687
 
3098
3688
  # @!method self.values
3099
3689
  # @return [Array<Symbol>]