revox 0.3.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 (105) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +26 -0
  3. data/README.md +38 -38
  4. data/lib/revox/models/assistant_clone_response.rb +87 -65
  5. data/lib/revox/models/assistant_create_params.rb +90 -66
  6. data/lib/revox/models/assistant_create_response.rb +87 -65
  7. data/lib/revox/models/assistant_list_response.rb +87 -65
  8. data/lib/revox/models/assistant_retrieve_response.rb +86 -65
  9. data/lib/revox/models/assistant_update_params.rb +90 -66
  10. data/lib/revox/models/assistant_update_response.rb +87 -65
  11. data/lib/revox/models/call_create_params.rb +117 -90
  12. data/lib/revox/models/call_create_response.rb +670 -90
  13. data/lib/revox/models/call_export_params.rb +1 -3
  14. data/lib/revox/models/call_phone_history_response.rb +0 -3
  15. data/lib/revox/models/call_retrieve_response.rb +671 -90
  16. data/lib/revox/models/call_search_params.rb +1 -3
  17. data/lib/revox/models/call_search_response.rb +670 -90
  18. data/lib/revox/models/campaign_create_params.rb +7 -57
  19. data/lib/revox/models/campaign_create_response.rb +108 -119
  20. data/lib/revox/models/campaign_get_rows_response.rb +672 -90
  21. data/lib/revox/models/campaign_list_response.rb +108 -119
  22. data/lib/revox/models/campaign_retrieve_response.rb +108 -119
  23. data/lib/revox/models/campaign_statistics_response.rb +51 -23
  24. data/lib/revox/models/campaign_update_params.rb +9 -78
  25. data/lib/revox/models/campaign_update_response.rb +108 -119
  26. data/lib/revox/models/phone_number_list_response.rb +87 -65
  27. data/lib/revox/models/phone_number_update_response.rb +87 -65
  28. data/lib/revox/models/voice_list_response.rb +1 -0
  29. data/lib/revox/models/voice_preview_params.rb +1 -0
  30. data/lib/revox/models/voice_retrieve_params.rb +1 -0
  31. data/lib/revox/models.rb +0 -2
  32. data/lib/revox/resources/assistants.rb +10 -10
  33. data/lib/revox/resources/call.rb +4 -4
  34. data/lib/revox/resources/campaigns.rb +13 -45
  35. data/lib/revox/version.rb +1 -1
  36. data/lib/revox.rb +0 -2
  37. data/rbi/revox/models/assistant_clone_response.rbi +157 -147
  38. data/rbi/revox/models/assistant_create_params.rbi +148 -162
  39. data/rbi/revox/models/assistant_create_response.rbi +157 -147
  40. data/rbi/revox/models/assistant_list_response.rbi +157 -147
  41. data/rbi/revox/models/assistant_retrieve_response.rbi +153 -147
  42. data/rbi/revox/models/assistant_update_params.rbi +148 -162
  43. data/rbi/revox/models/assistant_update_response.rbi +157 -147
  44. data/rbi/revox/models/call_create_params.rbi +190 -187
  45. data/rbi/revox/models/call_create_response.rbi +1138 -227
  46. data/rbi/revox/models/call_export_params.rbi +5 -15
  47. data/rbi/revox/models/call_phone_history_response.rbi +0 -15
  48. data/rbi/revox/models/call_retrieve_response.rbi +1138 -227
  49. data/rbi/revox/models/call_search_params.rbi +2 -9
  50. data/rbi/revox/models/call_search_response.rbi +1138 -227
  51. data/rbi/revox/models/campaign_create_params.rbi +9 -87
  52. data/rbi/revox/models/campaign_create_response.rbi +188 -266
  53. data/rbi/revox/models/campaign_get_rows_response.rbi +1138 -225
  54. data/rbi/revox/models/campaign_list_response.rbi +188 -262
  55. data/rbi/revox/models/campaign_retrieve_response.rbi +188 -266
  56. data/rbi/revox/models/campaign_statistics_response.rbi +94 -36
  57. data/rbi/revox/models/campaign_update_params.rbi +10 -128
  58. data/rbi/revox/models/campaign_update_response.rbi +188 -266
  59. data/rbi/revox/models/phone_number_list_response.rbi +157 -147
  60. data/rbi/revox/models/phone_number_update_response.rbi +157 -147
  61. data/rbi/revox/models/voice_list_response.rbi +5 -0
  62. data/rbi/revox/models/voice_preview_params.rbi +2 -0
  63. data/rbi/revox/models/voice_retrieve_params.rbi +2 -0
  64. data/rbi/revox/models.rbi +0 -2
  65. data/rbi/revox/resources/assistants.rbi +40 -22
  66. data/rbi/revox/resources/call.rbi +7 -4
  67. data/rbi/revox/resources/campaigns.rbi +12 -44
  68. data/sig/revox/models/assistant_clone_response.rbs +46 -54
  69. data/sig/revox/models/assistant_create_params.rbs +39 -58
  70. data/sig/revox/models/assistant_create_response.rbs +46 -54
  71. data/sig/revox/models/assistant_list_response.rbs +46 -54
  72. data/sig/revox/models/assistant_retrieve_response.rbs +46 -54
  73. data/sig/revox/models/assistant_update_params.rbs +39 -58
  74. data/sig/revox/models/assistant_update_response.rbs +46 -54
  75. data/sig/revox/models/call_create_params.rbs +50 -71
  76. data/sig/revox/models/call_create_response.rbs +468 -77
  77. data/sig/revox/models/call_export_params.rbs +2 -6
  78. data/sig/revox/models/call_phone_history_response.rbs +1 -10
  79. data/sig/revox/models/call_retrieve_response.rbs +468 -77
  80. data/sig/revox/models/call_search_params.rbs +2 -6
  81. data/sig/revox/models/call_search_response.rbs +468 -77
  82. data/sig/revox/models/campaign_create_params.rbs +5 -50
  83. data/sig/revox/models/campaign_create_response.rbs +62 -98
  84. data/sig/revox/models/campaign_get_rows_response.rbs +467 -73
  85. data/sig/revox/models/campaign_list_response.rbs +62 -98
  86. data/sig/revox/models/campaign_retrieve_response.rbs +62 -98
  87. data/sig/revox/models/campaign_statistics_response.rbs +55 -24
  88. data/sig/revox/models/campaign_update_params.rbs +1 -69
  89. data/sig/revox/models/campaign_update_response.rbs +62 -98
  90. data/sig/revox/models/phone_number_list_response.rbs +46 -54
  91. data/sig/revox/models/phone_number_update_response.rbs +46 -54
  92. data/sig/revox/models/voice_list_response.rbs +2 -1
  93. data/sig/revox/models/voice_preview_params.rbs +2 -1
  94. data/sig/revox/models/voice_retrieve_params.rbs +2 -1
  95. data/sig/revox/models.rbs +0 -2
  96. data/sig/revox/resources/assistants.rbs +4 -4
  97. data/sig/revox/resources/call.rbs +1 -1
  98. data/sig/revox/resources/campaigns.rbs +0 -12
  99. metadata +2 -8
  100. data/lib/revox/models/campaign_launch_params.rb +0 -20
  101. data/lib/revox/models/campaign_launch_response.rb +0 -2030
  102. data/rbi/revox/models/campaign_launch_params.rbi +0 -33
  103. data/rbi/revox/models/campaign_launch_response.rbi +0 -4170
  104. data/sig/revox/models/campaign_launch_params.rbs +0 -20
  105. data/sig/revox/models/campaign_launch_response.rbs +0 -1694
@@ -183,7 +183,16 @@ module Revox
183
183
  # @return [String, nil]
184
184
  optional :outcome_summary, String, nil?: true
185
185
 
186
- # @!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)
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)
187
196
  # Some parameter documentations has been truncated, see
188
197
  # {Revox::Models::CallRetrieveResponse::Call} for more details.
189
198
  #
@@ -241,6 +250,8 @@ module Revox
241
250
  # @param outcome [Symbol, Revox::Models::CallRetrieveResponse::Call::Outcome, nil] Business outcome of the call. Null if not computed or no transcript.
242
251
  #
243
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
244
255
 
245
256
  # @see Revox::Models::CallRetrieveResponse::Call#assignee
246
257
  class Assignee < Revox::Internal::Type::BaseModel
@@ -354,13 +365,6 @@ module Revox
354
365
  # @return [String, nil]
355
366
  required :email_notification_address, String, nil?: true
356
367
 
357
- # @!attribute email_notification_language
358
- # The language used for the notification email content. One of "en" or "fr".
359
- #
360
- # @return [Symbol, Revox::Models::CallRetrieveResponse::Call::Assistant::EmailNotificationLanguage]
361
- required :email_notification_language,
362
- enum: -> { Revox::Models::CallRetrieveResponse::Call::Assistant::EmailNotificationLanguage }
363
-
364
368
  # @!attribute email_notification_outcomes
365
369
  # Which call outcomes trigger an email notification. E.g. ["interested",
366
370
  # "completed", "none"]. Use "none" when outcome is null.
@@ -400,8 +404,8 @@ module Revox
400
404
  required :from_phone_number, String, nil?: true
401
405
 
402
406
  # @!attribute human_transfer_mode
403
- # Warm or cold transfer when transfer_phone_number is set; null when transfer is
404
- # not configured.
407
+ # Warm or cold transfer when transfer_destinations is non-empty; null when
408
+ # transfer is not configured.
405
409
  #
406
410
  # @return [Symbol, Revox::Models::CallRetrieveResponse::Call::Assistant::HumanTransferMode, nil]
407
411
  required :human_transfer_mode,
@@ -457,6 +461,13 @@ module Revox
457
461
  # @return [Revox::Models::CallRetrieveResponse::Call::Assistant::Position, nil]
458
462
  required :position, -> { Revox::Models::CallRetrieveResponse::Call::Assistant::Position }, nil?: true
459
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
+
460
471
  # @!attribute prompt
461
472
  #
462
473
  # @return [String]
@@ -540,11 +551,14 @@ module Revox
540
551
  # @return [Float]
541
552
  required :thinking_sound_volume, Float
542
553
 
543
- # @!attribute transfer_phone_number
544
- # 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.
545
557
  #
546
- # @return [String, nil]
547
- required :transfer_phone_number, String, nil?: true
558
+ # @return [Array<Revox::Models::CallRetrieveResponse::Call::Assistant::TransferDestination>, nil]
559
+ required :transfer_destinations,
560
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CallRetrieveResponse::Call::Assistant::TransferDestination] },
561
+ nil?: true
548
562
 
549
563
  # @!attribute type
550
564
  #
@@ -605,6 +619,11 @@ module Revox
605
619
  optional :faq_items,
606
620
  -> { Revox::Internal::Type::ArrayOf[Revox::Models::CallRetrieveResponse::Call::Assistant::FaqItem] }
607
621
 
622
+ # @!attribute is_inbound_receptionist
623
+ #
624
+ # @return [Boolean, nil]
625
+ optional :is_inbound_receptionist, Revox::Internal::Type::Boolean
626
+
608
627
  # @!attribute is_realestate_assistant
609
628
  #
610
629
  # @return [Boolean, nil]
@@ -615,7 +634,7 @@ module Revox
615
634
  # @return [Float, nil]
616
635
  optional :pending_faq_count, Float
617
636
 
618
- # @!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)
619
638
  # Some parameter documentations has been truncated, see
620
639
  # {Revox::Models::CallRetrieveResponse::Call::Assistant} for more details.
621
640
  #
@@ -641,8 +660,6 @@ module Revox
641
660
  #
642
661
  # @param email_notification_address [String, nil] Email address(es) to receive notifications when a call ends with a matching outc
643
662
  #
644
- # @param email_notification_language [Symbol, Revox::Models::CallRetrieveResponse::Call::Assistant::EmailNotificationLanguage] The language used for the notification email content. One of "en" or "fr".
645
- #
646
663
  # @param email_notification_outcomes [Array<Symbol, Revox::Models::CallRetrieveResponse::Call::Assistant::EmailNotificationOutcome>, nil] Which call outcomes trigger an email notification. E.g. ["interested", "complete
647
664
  #
648
665
  # @param end_of_call_sentence [String, nil]
@@ -655,7 +672,7 @@ module Revox
655
672
  #
656
673
  # @param from_phone_number [String, nil] Override the default outbound phone number for calls placed with this assistant.
657
674
  #
658
- # @param human_transfer_mode [Symbol, Revox::Models::CallRetrieveResponse::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::CallRetrieveResponse::Call::Assistant::HumanTransferMode, nil] Warm or cold transfer when transfer_destinations is non-empty; null when transfe
659
676
  #
660
677
  # @param ivr_navigation_enabled [Boolean] Enable IVR navigation tools. When enabled, the assistant can send DTMF tones and
661
678
  #
@@ -673,6 +690,8 @@ module Revox
673
690
  #
674
691
  # @param position [Revox::Models::CallRetrieveResponse::Call::Assistant::Position, nil]
675
692
  #
693
+ # @param precall_lookup_url [String, nil] URL fetched before an inbound call is answered to resolve the assistant's prompt
694
+ #
676
695
  # @param prompt [String]
677
696
  #
678
697
  # @param prompt_flow [Revox::Models::CallRetrieveResponse::Call::Assistant::PromptFlow, nil]
@@ -697,7 +716,7 @@ module Revox
697
716
  #
698
717
  # @param thinking_sound_volume [Float] Volume of the thinking sound (0 = silent, 1 = max).
699
718
  #
700
- # @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::CallRetrieveResponse::Call::Assistant::TransferDestination>, nil] Where calls can be transferred to when users ask to speak to a human. Null or em
701
720
  #
702
721
  # @param type [Symbol, Revox::Models::CallRetrieveResponse::Call::Assistant::Type]
703
722
  #
@@ -719,6 +738,8 @@ module Revox
719
738
  #
720
739
  # @param faq_items [Array<Revox::Models::CallRetrieveResponse::Call::Assistant::FaqItem>]
721
740
  #
741
+ # @param is_inbound_receptionist [Boolean]
742
+ #
722
743
  # @param is_realestate_assistant [Boolean]
723
744
  #
724
745
  # @param pending_faq_count [Float]
@@ -730,9 +751,6 @@ module Revox
730
751
  INTERESTED = :interested
731
752
  COMPLETED = :completed
732
753
  REQUESTED_CALLBACK_LATER = :requested_callback_later
733
- REQUESTED_CALLBACK_NEW_NUMBER = :requested_callback_new_number
734
- DO_NOT_CONTACT = :do_not_contact
735
- AI_AVERSE = :ai_averse
736
754
  NONE = :none
737
755
 
738
756
  # @!method self.values
@@ -866,7 +884,8 @@ module Revox
866
884
  required :calling_window_start_time, String
867
885
 
868
886
  # @!attribute retry_delay_seconds
869
- # Delay between retry attempts in seconds. Default: 7200 (2 hours).
887
+ # Delay between retry attempts in seconds. 0 retries as soon as the calling window
888
+ # allows. Default: 7200 (2 hours).
870
889
  #
871
890
  # @return [Integer]
872
891
  required :retry_delay_seconds, Integer
@@ -880,7 +899,7 @@ module Revox
880
899
  #
881
900
  # @param calling_window_start_time [String] Start time for the calling window in the recipient's timezone (or timezone_overr
882
901
  #
883
- # @param retry_delay_seconds [Integer] Delay between retry attempts in seconds. Default: 7200 (2 hours).
902
+ # @param retry_delay_seconds [Integer] Delay between retry attempts in seconds. 0 retries as soon as the calling window
884
903
  end
885
904
  end
886
905
 
@@ -1063,19 +1082,6 @@ module Revox
1063
1082
  end
1064
1083
  end
1065
1084
 
1066
- # The language used for the notification email content. One of "en" or "fr".
1067
- #
1068
- # @see Revox::Models::CallRetrieveResponse::Call::Assistant#email_notification_language
1069
- module EmailNotificationLanguage
1070
- extend Revox::Internal::Type::Enum
1071
-
1072
- EN = :en
1073
- FR = :fr
1074
-
1075
- # @!method self.values
1076
- # @return [Array<Symbol>]
1077
- end
1078
-
1079
1085
  module EmailNotificationOutcome
1080
1086
  extend Revox::Internal::Type::Enum
1081
1087
 
@@ -1083,9 +1089,6 @@ module Revox
1083
1089
  INTERESTED = :interested
1084
1090
  COMPLETED = :completed
1085
1091
  REQUESTED_CALLBACK_LATER = :requested_callback_later
1086
- REQUESTED_CALLBACK_NEW_NUMBER = :requested_callback_new_number
1087
- DO_NOT_CONTACT = :do_not_contact
1088
- AI_AVERSE = :ai_averse
1089
1092
  NONE = :none
1090
1093
 
1091
1094
  # @!method self.values
@@ -1104,8 +1107,8 @@ module Revox
1104
1107
  # @return [Array<Symbol>]
1105
1108
  end
1106
1109
 
1107
- # Warm or cold transfer when transfer_phone_number is set; null when transfer is
1108
- # not configured.
1110
+ # Warm or cold transfer when transfer_destinations is non-empty; null when
1111
+ # transfer is not configured.
1109
1112
  #
1110
1113
  # @see Revox::Models::CallRetrieveResponse::Call::Assistant#human_transfer_mode
1111
1114
  module HumanTransferMode
@@ -1396,11 +1399,14 @@ module Revox
1396
1399
 
1397
1400
  # @see Revox::Models::CallRetrieveResponse::Call::Assistant#slack
1398
1401
  class Slack < Revox::Internal::Type::BaseModel
1399
- # @!attribute channel_id
1400
- # The Slack channel ID where the notification will be posted.
1402
+ # @!attribute channels
1403
+ # The Slack channels eligible to receive the notification. When more than one is
1404
+ # configured, the agent prompt may define routing rules to narrow it down per
1405
+ # call; with no such rules every channel here is notified.
1401
1406
  #
1402
- # @return [String]
1403
- required :channel_id, String
1407
+ # @return [Array<Revox::Models::CallRetrieveResponse::Call::Assistant::Slack::Channel>]
1408
+ required :channels,
1409
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CallRetrieveResponse::Call::Assistant::Slack::Channel] }
1404
1410
 
1405
1411
  # @!attribute connection_id
1406
1412
  # The Nango connection ID linking the org's Slack workspace to Revox.
@@ -1416,37 +1422,53 @@ module Revox
1416
1422
  required :outcomes,
1417
1423
  -> { Revox::Internal::Type::ArrayOf[enum: Revox::Models::CallRetrieveResponse::Call::Assistant::Slack::Outcome] }
1418
1424
 
1419
- # @!attribute channel_name
1420
- # Human-readable Slack channel name, cached for display in the UI.
1421
- #
1422
- # @return [String, nil]
1423
- optional :channel_name, String, nil?: true
1424
-
1425
1425
  # @!attribute template
1426
1426
  # Optional message template. Supports {{summary}}, {{outcome}}, {{phone}},
1427
1427
  # {{call_url}}, {{assistant_name}}, {{campaign_name}}, {{first_name}},
1428
- # {{last_name}}, {{email}}, {{company}}, {{contact_name}}, {{contact_line}}, plus
1429
- # prompt_variables and structured_output keys. When null/empty a default template
1430
- # is used.
1428
+ # {{last_name}}, {{email}}, {{company}}, {{job_title}}, {{contact_name}},
1429
+ # {{contact_line}}, plus prompt_variables and structured_output keys. When
1430
+ # null/empty a default template is used.
1431
1431
  #
1432
1432
  # @return [String, nil]
1433
1433
  optional :template, String, nil?: true
1434
1434
 
1435
- # @!method initialize(channel_id:, connection_id:, outcomes:, channel_name: nil, template: nil)
1435
+ # @!method initialize(channels:, connection_id:, outcomes:, template: nil)
1436
1436
  # Some parameter documentations has been truncated, see
1437
1437
  # {Revox::Models::CallRetrieveResponse::Call::Assistant::Slack} for more details.
1438
1438
  #
1439
- # @param channel_id [String] The Slack channel ID where the notification will be posted.
1439
+ # @param channels [Array<Revox::Models::CallRetrieveResponse::Call::Assistant::Slack::Channel>] The Slack channels eligible to receive the notification. When more than one is c
1440
1440
  #
1441
1441
  # @param connection_id [String] The Nango connection ID linking the org's Slack workspace to Revox.
1442
1442
  #
1443
1443
  # @param outcomes [Array<Symbol, Revox::Models::CallRetrieveResponse::Call::Assistant::Slack::Outcome>] Which call outcomes trigger a Slack notification (e.g. ['interested', 'none']).
1444
1444
  #
1445
- # @param channel_name [String, nil] Human-readable Slack channel name, cached for display in the UI.
1446
- #
1447
1445
  # @param template [String, nil] Optional message template. Supports {{summary}}, {{outcome}}, {{phone}},
1448
1446
  # {{call\_
1449
1447
 
1448
+ class Channel < Revox::Internal::Type::BaseModel
1449
+ # @!attribute id
1450
+ # The Slack channel ID (e.g. 'C01234567').
1451
+ #
1452
+ # @return [String]
1453
+ required :id, String
1454
+
1455
+ # @!attribute name
1456
+ # Human-readable Slack channel name, cached for display in the UI and given to the
1457
+ # LLM when the agent prompt routes by channel name.
1458
+ #
1459
+ # @return [String, nil]
1460
+ optional :name, String, nil?: true
1461
+
1462
+ # @!method initialize(id:, name: nil)
1463
+ # Some parameter documentations has been truncated, see
1464
+ # {Revox::Models::CallRetrieveResponse::Call::Assistant::Slack::Channel} for more
1465
+ # details.
1466
+ #
1467
+ # @param id [String] The Slack channel ID (e.g. 'C01234567').
1468
+ #
1469
+ # @param name [String, nil] Human-readable Slack channel name, cached for display in the UI and given to the
1470
+ end
1471
+
1450
1472
  module Outcome
1451
1473
  extend Revox::Internal::Type::Enum
1452
1474
 
@@ -1454,9 +1476,6 @@ module Revox
1454
1476
  INTERESTED = :interested
1455
1477
  COMPLETED = :completed
1456
1478
  REQUESTED_CALLBACK_LATER = :requested_callback_later
1457
- REQUESTED_CALLBACK_NEW_NUMBER = :requested_callback_new_number
1458
- DO_NOT_CONTACT = :do_not_contact
1459
- AI_AVERSE = :ai_averse
1460
1479
  NONE = :none
1461
1480
 
1462
1481
  # @!method self.values
@@ -1584,6 +1603,22 @@ module Revox
1584
1603
  # @return [Array<Symbol>]
1585
1604
  end
1586
1605
 
1606
+ class TransferDestination < Revox::Internal::Type::BaseModel
1607
+ # @!attribute label
1608
+ #
1609
+ # @return [String]
1610
+ required :label, String
1611
+
1612
+ # @!attribute phone_number
1613
+ #
1614
+ # @return [String]
1615
+ required :phone_number, String
1616
+
1617
+ # @!method initialize(label:, phone_number:)
1618
+ # @param label [String]
1619
+ # @param phone_number [String]
1620
+ end
1621
+
1587
1622
  # @see Revox::Models::CallRetrieveResponse::Call::Assistant#type
1588
1623
  module Type
1589
1624
  extend Revox::Internal::Type::Enum
@@ -1619,7 +1654,7 @@ module Revox
1619
1654
 
1620
1655
  # @!attribute speed
1621
1656
  # The speed of the voice. Range depends on provider: Cartesia 0.6–1.5, ElevenLabs
1622
- # 0.7–1.2. Default is 1.0.
1657
+ # 0.7–1.2, Gradium 0.6–1.5. Default is 1.0.
1623
1658
  #
1624
1659
  # @return [Float, nil]
1625
1660
  optional :speed, Float
@@ -1653,6 +1688,7 @@ module Revox
1653
1688
 
1654
1689
  CARTESIA = :cartesia
1655
1690
  ELEVENLABS = :elevenlabs
1691
+ GRADIUM = :gradium
1656
1692
 
1657
1693
  # @!method self.values
1658
1694
  # @return [Array<Symbol>]
@@ -1767,9 +1803,6 @@ module Revox
1767
1803
  INTERESTED = :interested
1768
1804
  COMPLETED = :completed
1769
1805
  REQUESTED_CALLBACK_LATER = :requested_callback_later
1770
- REQUESTED_CALLBACK_NEW_NUMBER = :requested_callback_new_number
1771
- DO_NOT_CONTACT = :do_not_contact
1772
- AI_AVERSE = :ai_averse
1773
1806
  NONE = :none
1774
1807
 
1775
1808
  # @!method self.values
@@ -1885,6 +1918,29 @@ module Revox
1885
1918
  # @return [Object]
1886
1919
  required :ended_at, Revox::Internal::Type::Unknown
1887
1920
 
1921
+ # @!attribute handled_by_ai
1922
+ # Whether the AI agent conducted the conversation on this attempt. False for a
1923
+ # silent speed-dial probe (whose agent only detects a human) and for attempts that
1924
+ # were never answered.
1925
+ #
1926
+ # @return [Boolean]
1927
+ required :handled_by_ai, Revox::Internal::Type::Boolean
1928
+
1929
+ # @!attribute handled_by_human
1930
+ # Whether a human operator conducted (part of) this attempt — a jump-in takeover
1931
+ # or a speed-dial operator connection (both stamp human_takeover_at).
1932
+ #
1933
+ # @return [Boolean]
1934
+ required :handled_by_human, Revox::Internal::Type::Boolean
1935
+
1936
+ # @!attribute handled_by_user
1937
+ # The team member responsible for following up on this call.
1938
+ #
1939
+ # @return [Revox::Models::CallRetrieveResponse::Call::CallAttempt::HandledByUser, nil]
1940
+ required :handled_by_user,
1941
+ -> { Revox::Models::CallRetrieveResponse::Call::CallAttempt::HandledByUser },
1942
+ nil?: true
1943
+
1888
1944
  # @!attribute phone_number
1889
1945
  # The phone number that was called. Formatted in E.164 format. Example:
1890
1946
  # +1234567890
@@ -1921,6 +1977,15 @@ module Revox
1921
1977
  # @return [Array<String>, nil]
1922
1978
  optional :assistants_used, Revox::Internal::Type::ArrayOf[String], nil?: true
1923
1979
 
1980
+ # @!attribute email_log
1981
+ # Notification emails sent in connection with the call, ordered oldest first
1982
+ # (from/to addresses, subject, sent time).
1983
+ #
1984
+ # @return [Array<Revox::Models::CallRetrieveResponse::Call::CallAttempt::EmailLog>, nil]
1985
+ optional :email_log,
1986
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CallRetrieveResponse::Call::CallAttempt::EmailLog] },
1987
+ nil?: true
1988
+
1924
1989
  # @!attribute end_reason
1925
1990
  # Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call',
1926
1991
  # 'voicemail', 'transfer', 'ivr_no_navigate'.
@@ -1958,6 +2023,16 @@ module Revox
1958
2023
  -> { Revox::Internal::Type::ArrayOf[Revox::Models::CallRetrieveResponse::Call::CallAttempt::SMSLog] },
1959
2024
  nil?: true
1960
2025
 
2026
+ # @!attribute speech_events
2027
+ # Per-turn speech segments (VAD-derived) with timing and pipeline latencies,
2028
+ # ordered by started_speaking_at_ms. Empty for calls recorded before this was
2029
+ # tracked or for realtime sessions that don't emit them.
2030
+ #
2031
+ # @return [Array<Revox::Models::CallRetrieveResponse::Call::CallAttempt::SpeechEvent>, nil]
2032
+ optional :speech_events,
2033
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CallRetrieveResponse::Call::CallAttempt::SpeechEvent] },
2034
+ nil?: true
2035
+
1961
2036
  # @!attribute structured_output
1962
2037
  # The data extracted from the call, using the structured output config from the
1963
2038
  # parent call object.
@@ -1975,7 +2050,7 @@ module Revox
1975
2050
  -> { Revox::Internal::Type::ArrayOf[Revox::Models::CallRetrieveResponse::Call::CallAttempt::Transcript] },
1976
2051
  nil?: true
1977
2052
 
1978
- # @!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)
2053
+ # @!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)
1979
2054
  # Some parameter documentations has been truncated, see
1980
2055
  # {Revox::Models::CallRetrieveResponse::Call::CallAttempt} for more details.
1981
2056
  #
@@ -1990,6 +2065,12 @@ module Revox
1990
2065
  #
1991
2066
  # @param ended_at [Object] The time the call ended.
1992
2067
  #
2068
+ # @param handled_by_ai [Boolean] Whether the AI agent conducted the conversation on this attempt. False for a sil
2069
+ #
2070
+ # @param handled_by_human [Boolean] Whether a human operator conducted (part of) this attempt — a jump-in takeover o
2071
+ #
2072
+ # @param handled_by_user [Revox::Models::CallRetrieveResponse::Call::CallAttempt::HandledByUser, nil] The team member responsible for following up on this call.
2073
+ #
1993
2074
  # @param phone_number [String] The phone number that was called. Formatted in E.164 format. Example: +123456789
1994
2075
  #
1995
2076
  # @param recording_url [String, nil] The URL of the audio recording of the call.
@@ -2002,6 +2083,8 @@ module Revox
2002
2083
  #
2003
2084
  # @param assistants_used [Array<String>, nil] Assistant node ids entered during this attempt, in traversal order.
2004
2085
  #
2086
+ # @param email_log [Array<Revox::Models::CallRetrieveResponse::Call::CallAttempt::EmailLog>, nil] Notification emails sent in connection with the call, ordered oldest first (from
2087
+ #
2005
2088
  # @param end_reason [Symbol, Revox::Models::CallRetrieveResponse::Call::CallAttempt::EndReason, nil] Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call', 'voic
2006
2089
  #
2007
2090
  # @param ended_by [Symbol, Revox::Models::CallRetrieveResponse::Call::CallAttempt::EndedBy, nil] Who ended the call: 'agent' (AI agent), 'user' (caller/callee hung up), or 'syst
@@ -2010,6 +2093,8 @@ module Revox
2010
2093
  #
2011
2094
  # @param sms_log [Array<Revox::Models::CallRetrieveResponse::Call::CallAttempt::SMSLog>, nil] Automatic SMS sent after the call (voicemail and after-call), ordered oldest fir
2012
2095
  #
2096
+ # @param speech_events [Array<Revox::Models::CallRetrieveResponse::Call::CallAttempt::SpeechEvent>, nil] Per-turn speech segments (VAD-derived) with timing and pipeline latencies, order
2097
+ #
2013
2098
  # @param structured_output [Hash{Symbol=>Object}, nil] The data extracted from the call, using the structured output config from the pa
2014
2099
  #
2015
2100
  # @param transcript [Array<Revox::Models::CallRetrieveResponse::Call::CallAttempt::Transcript>, nil] The live transcript of the call, built in real time.
@@ -2033,6 +2118,41 @@ module Revox
2033
2118
  # @return [Array<Symbol>]
2034
2119
  end
2035
2120
 
2121
+ # @see Revox::Models::CallRetrieveResponse::Call::CallAttempt#handled_by_user
2122
+ class HandledByUser < Revox::Internal::Type::BaseModel
2123
+ # @!attribute id
2124
+ # The database user id of the assignee.
2125
+ #
2126
+ # @return [String]
2127
+ required :id, String
2128
+
2129
+ # @!attribute email
2130
+ #
2131
+ # @return [String]
2132
+ required :email, String
2133
+
2134
+ # @!attribute first_name
2135
+ #
2136
+ # @return [String, nil]
2137
+ required :first_name, String, nil?: true
2138
+
2139
+ # @!attribute last_name
2140
+ #
2141
+ # @return [String, nil]
2142
+ required :last_name, String, nil?: true
2143
+
2144
+ # @!method initialize(id:, email:, first_name:, last_name:)
2145
+ # The team member responsible for following up on this call.
2146
+ #
2147
+ # @param id [String] The database user id of the assignee.
2148
+ #
2149
+ # @param email [String]
2150
+ #
2151
+ # @param first_name [String, nil]
2152
+ #
2153
+ # @param last_name [String, nil]
2154
+ end
2155
+
2036
2156
  # @see Revox::Models::CallRetrieveResponse::Call::CallAttempt#result
2037
2157
  module Result
2038
2158
  extend Revox::Internal::Type::Enum
@@ -2063,6 +2183,52 @@ module Revox
2063
2183
  # @return [Array<Symbol>]
2064
2184
  end
2065
2185
 
2186
+ class EmailLog < Revox::Internal::Type::BaseModel
2187
+ # @!attribute id
2188
+ #
2189
+ # @return [String]
2190
+ required :id, String
2191
+
2192
+ # @!attribute created_at
2193
+ # When the email was sent.
2194
+ #
2195
+ # @return [Object]
2196
+ required :created_at, Revox::Internal::Type::Unknown
2197
+
2198
+ # @!attribute from_address
2199
+ #
2200
+ # @return [String]
2201
+ required :from_address, String
2202
+
2203
+ # @!attribute resend_message_id
2204
+ #
2205
+ # @return [String, nil]
2206
+ required :resend_message_id, String, nil?: true
2207
+
2208
+ # @!attribute subject
2209
+ #
2210
+ # @return [String]
2211
+ required :subject, String
2212
+
2213
+ # @!attribute to_emails
2214
+ #
2215
+ # @return [Array<String>]
2216
+ required :to_emails, Revox::Internal::Type::ArrayOf[String]
2217
+
2218
+ # @!method initialize(id:, created_at:, from_address:, resend_message_id:, subject:, to_emails:)
2219
+ # @param id [String]
2220
+ #
2221
+ # @param created_at [Object] When the email was sent.
2222
+ #
2223
+ # @param from_address [String]
2224
+ #
2225
+ # @param resend_message_id [String, nil]
2226
+ #
2227
+ # @param subject [String]
2228
+ #
2229
+ # @param to_emails [Array<String>]
2230
+ end
2231
+
2066
2232
  # Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call',
2067
2233
  # 'voicemail', 'transfer', 'ivr_no_navigate'.
2068
2234
  #
@@ -2193,34 +2359,52 @@ module Revox
2193
2359
  # @return [String]
2194
2360
  required :message_body, String
2195
2361
 
2196
- # @!attribute to_phone_number
2362
+ # @!attribute provider
2197
2363
  #
2198
- # @return [String]
2199
- required :to_phone_number, String
2364
+ # @return [Symbol, Revox::Models::CallRetrieveResponse::Call::CallAttempt::SMSLog::Provider]
2365
+ required :provider, enum: -> { Revox::Models::CallRetrieveResponse::Call::CallAttempt::SMSLog::Provider }
2200
2366
 
2201
- # @!attribute twilio_message_sid
2367
+ # @!attribute provider_message_id
2202
2368
  #
2203
2369
  # @return [String, nil]
2204
- required :twilio_message_sid, String, nil?: true
2370
+ required :provider_message_id, String, nil?: true
2371
+
2372
+ # @!attribute to_phone_number
2373
+ #
2374
+ # @return [String]
2375
+ required :to_phone_number, String
2205
2376
 
2206
2377
  # @!attribute type
2207
2378
  #
2208
2379
  # @return [Symbol, Revox::Models::CallRetrieveResponse::Call::CallAttempt::SMSLog::Type]
2209
2380
  required :type, enum: -> { Revox::Models::CallRetrieveResponse::Call::CallAttempt::SMSLog::Type }
2210
2381
 
2211
- # @!method initialize(id:, created_at:, message_body:, to_phone_number:, twilio_message_sid:, type:)
2382
+ # @!method initialize(id:, created_at:, message_body:, provider:, provider_message_id:, to_phone_number:, type:)
2212
2383
  # @param id [String]
2213
2384
  #
2214
2385
  # @param created_at [Object] When the SMS was sent.
2215
2386
  #
2216
2387
  # @param message_body [String]
2217
2388
  #
2218
- # @param to_phone_number [String]
2389
+ # @param provider [Symbol, Revox::Models::CallRetrieveResponse::Call::CallAttempt::SMSLog::Provider]
2390
+ #
2391
+ # @param provider_message_id [String, nil]
2219
2392
  #
2220
- # @param twilio_message_sid [String, nil]
2393
+ # @param to_phone_number [String]
2221
2394
  #
2222
2395
  # @param type [Symbol, Revox::Models::CallRetrieveResponse::Call::CallAttempt::SMSLog::Type]
2223
2396
 
2397
+ # @see Revox::Models::CallRetrieveResponse::Call::CallAttempt::SMSLog#provider
2398
+ module Provider
2399
+ extend Revox::Internal::Type::Enum
2400
+
2401
+ TWILIO = :twilio
2402
+ VONAGE = :vonage
2403
+
2404
+ # @!method self.values
2405
+ # @return [Array<Symbol>]
2406
+ end
2407
+
2224
2408
  # @see Revox::Models::CallRetrieveResponse::Call::CallAttempt::SMSLog#type
2225
2409
  module Type
2226
2410
  extend Revox::Internal::Type::Enum
@@ -2234,6 +2418,126 @@ module Revox
2234
2418
  end
2235
2419
  end
2236
2420
 
2421
+ class SpeechEvent < Revox::Internal::Type::BaseModel
2422
+ # @!attribute id
2423
+ #
2424
+ # @return [String]
2425
+ required :id, String
2426
+
2427
+ # @!attribute is_real_turn
2428
+ # False when the segment was flagged as noise/blip rather than a meaningful turn.
2429
+ #
2430
+ # @return [Boolean]
2431
+ required :is_real_turn, Revox::Internal::Type::Boolean
2432
+
2433
+ # @!attribute llm_system_prompt
2434
+ # Agent-only: despite the name, the whole prompt the LLM was given for this turn —
2435
+ # system instructions plus conversation history — as JSON.
2436
+ #
2437
+ # @return [String, nil]
2438
+ required :llm_system_prompt, String, nil?: true
2439
+
2440
+ # @!attribute llm_ttft_ms
2441
+ # Agent-only: LLM time-to-first-token for the reply, in ms.
2442
+ #
2443
+ # @return [Float, nil]
2444
+ required :llm_ttft_ms, Float, nil?: true
2445
+
2446
+ # @!attribute llm_winner_model
2447
+ # Agent-only: the model that produced the reply — the winning leg when the LLM is
2448
+ # a race, which is also the model `llm_ttft_ms` describes.
2449
+ #
2450
+ # @return [String, nil]
2451
+ required :llm_winner_model, String, nil?: true
2452
+
2453
+ # @!attribute speaker
2454
+ # Who was speaking during this segment.
2455
+ #
2456
+ # @return [Symbol, Revox::Models::CallRetrieveResponse::Call::CallAttempt::SpeechEvent::Speaker]
2457
+ required :speaker,
2458
+ enum: -> { Revox::Models::CallRetrieveResponse::Call::CallAttempt::SpeechEvent::Speaker }
2459
+
2460
+ # @!attribute started_speaking_at_ms
2461
+ # Milliseconds since session start when speech began.
2462
+ #
2463
+ # @return [Float]
2464
+ required :started_speaking_at_ms, Float
2465
+
2466
+ # @!attribute stopped_speaking_at_ms
2467
+ # Milliseconds since session start when speech ended. Null when the session ended
2468
+ # before the turn closed.
2469
+ #
2470
+ # @return [Float, nil]
2471
+ required :stopped_speaking_at_ms, Float, nil?: true
2472
+
2473
+ # @!attribute stt_transcription_delay_ms
2474
+ # User-only: time from end-of-speech to final transcript, in ms.
2475
+ #
2476
+ # @return [Float, nil]
2477
+ required :stt_transcription_delay_ms, Float, nil?: true
2478
+
2479
+ # @!attribute transcript
2480
+ # Recognized text for this segment, when available.
2481
+ #
2482
+ # @return [String, nil]
2483
+ required :transcript, String, nil?: true
2484
+
2485
+ # @!attribute tts_ttfb_ms
2486
+ # Agent-only: TTS time-to-first-audio-byte for the reply, in ms.
2487
+ #
2488
+ # @return [Float, nil]
2489
+ required :tts_ttfb_ms, Float, nil?: true
2490
+
2491
+ # @!attribute was_cut
2492
+ # Agent-only: true when the agent's audio was interrupted (real or auto-resumed).
2493
+ # Null on user segments.
2494
+ #
2495
+ # @return [Boolean, nil]
2496
+ required :was_cut, Revox::Internal::Type::Boolean, nil?: true
2497
+
2498
+ # @!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:)
2499
+ # Some parameter documentations has been truncated, see
2500
+ # {Revox::Models::CallRetrieveResponse::Call::CallAttempt::SpeechEvent} for more
2501
+ # details.
2502
+ #
2503
+ # @param id [String]
2504
+ #
2505
+ # @param is_real_turn [Boolean] False when the segment was flagged as noise/blip rather than a meaningful turn.
2506
+ #
2507
+ # @param llm_system_prompt [String, nil] Agent-only: despite the name, the whole prompt the LLM was given for this turn —
2508
+ #
2509
+ # @param llm_ttft_ms [Float, nil] Agent-only: LLM time-to-first-token for the reply, in ms.
2510
+ #
2511
+ # @param llm_winner_model [String, nil] Agent-only: the model that produced the reply — the winning leg when the LLM is
2512
+ #
2513
+ # @param speaker [Symbol, Revox::Models::CallRetrieveResponse::Call::CallAttempt::SpeechEvent::Speaker] Who was speaking during this segment.
2514
+ #
2515
+ # @param started_speaking_at_ms [Float] Milliseconds since session start when speech began.
2516
+ #
2517
+ # @param stopped_speaking_at_ms [Float, nil] Milliseconds since session start when speech ended. Null when the session ended
2518
+ #
2519
+ # @param stt_transcription_delay_ms [Float, nil] User-only: time from end-of-speech to final transcript, in ms.
2520
+ #
2521
+ # @param transcript [String, nil] Recognized text for this segment, when available.
2522
+ #
2523
+ # @param tts_ttfb_ms [Float, nil] Agent-only: TTS time-to-first-audio-byte for the reply, in ms.
2524
+ #
2525
+ # @param was_cut [Boolean, nil] Agent-only: true when the agent's audio was interrupted (real or auto-resumed).
2526
+
2527
+ # Who was speaking during this segment.
2528
+ #
2529
+ # @see Revox::Models::CallRetrieveResponse::Call::CallAttempt::SpeechEvent#speaker
2530
+ module Speaker
2531
+ extend Revox::Internal::Type::Enum
2532
+
2533
+ USER = :user
2534
+ AGENT = :agent
2535
+
2536
+ # @!method self.values
2537
+ # @return [Array<Symbol>]
2538
+ end
2539
+ end
2540
+
2237
2541
  class Transcript < Revox::Internal::Type::BaseModel
2238
2542
  # @!attribute content
2239
2543
  #
@@ -2393,7 +2697,8 @@ module Revox
2393
2697
  required :calling_window_start_time, String
2394
2698
 
2395
2699
  # @!attribute retry_delay_seconds
2396
- # Delay between retry attempts in seconds. Default: 7200 (2 hours).
2700
+ # Delay between retry attempts in seconds. 0 retries as soon as the calling window
2701
+ # allows. Default: 7200 (2 hours).
2397
2702
  #
2398
2703
  # @return [Integer]
2399
2704
  required :retry_delay_seconds, Integer
@@ -2407,7 +2712,7 @@ module Revox
2407
2712
  #
2408
2713
  # @param calling_window_start_time [String] Start time for the calling window in the recipient's timezone (or timezone_overr
2409
2714
  #
2410
- # @param retry_delay_seconds [Integer] Delay between retry attempts in seconds. Default: 7200 (2 hours).
2715
+ # @param retry_delay_seconds [Integer] Delay between retry attempts in seconds. 0 retries as soon as the calling window
2411
2716
  end
2412
2717
  end
2413
2718
 
@@ -2445,18 +2750,24 @@ module Revox
2445
2750
  # @return [String, nil]
2446
2751
  required :first_name, String, nil?: true
2447
2752
 
2753
+ # @!attribute job_title
2754
+ #
2755
+ # @return [String, nil]
2756
+ required :job_title, String, nil?: true
2757
+
2448
2758
  # @!attribute last_name
2449
2759
  #
2450
2760
  # @return [String, nil]
2451
2761
  required :last_name, String, nil?: true
2452
2762
 
2453
- # @!method initialize(company:, email:, first_name:, last_name:)
2763
+ # @!method initialize(company:, email:, first_name:, job_title:, last_name:)
2454
2764
  # Magic contact variables (prospect identity) extracted from the call's input data
2455
2765
  # and transcript.
2456
2766
  #
2457
2767
  # @param company [String, nil]
2458
2768
  # @param email [String, nil]
2459
2769
  # @param first_name [String, nil]
2770
+ # @param job_title [String, nil]
2460
2771
  # @param last_name [String, nil]
2461
2772
  end
2462
2773
 
@@ -2501,6 +2812,29 @@ module Revox
2501
2812
  # @return [Object]
2502
2813
  required :ended_at, Revox::Internal::Type::Unknown
2503
2814
 
2815
+ # @!attribute handled_by_ai
2816
+ # Whether the AI agent conducted the conversation on this attempt. False for a
2817
+ # silent speed-dial probe (whose agent only detects a human) and for attempts that
2818
+ # were never answered.
2819
+ #
2820
+ # @return [Boolean]
2821
+ required :handled_by_ai, Revox::Internal::Type::Boolean
2822
+
2823
+ # @!attribute handled_by_human
2824
+ # Whether a human operator conducted (part of) this attempt — a jump-in takeover
2825
+ # or a speed-dial operator connection (both stamp human_takeover_at).
2826
+ #
2827
+ # @return [Boolean]
2828
+ required :handled_by_human, Revox::Internal::Type::Boolean
2829
+
2830
+ # @!attribute handled_by_user
2831
+ # The team member responsible for following up on this call.
2832
+ #
2833
+ # @return [Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::HandledByUser, nil]
2834
+ required :handled_by_user,
2835
+ -> { Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::HandledByUser },
2836
+ nil?: true
2837
+
2504
2838
  # @!attribute phone_number
2505
2839
  # The phone number that was called. Formatted in E.164 format. Example:
2506
2840
  # +1234567890
@@ -2539,6 +2873,15 @@ module Revox
2539
2873
  # @return [Array<String>, nil]
2540
2874
  optional :assistants_used, Revox::Internal::Type::ArrayOf[String], nil?: true
2541
2875
 
2876
+ # @!attribute email_log
2877
+ # Notification emails sent in connection with the call, ordered oldest first
2878
+ # (from/to addresses, subject, sent time).
2879
+ #
2880
+ # @return [Array<Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::EmailLog>, nil]
2881
+ optional :email_log,
2882
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::EmailLog] },
2883
+ nil?: true
2884
+
2542
2885
  # @!attribute end_reason
2543
2886
  # Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call',
2544
2887
  # 'voicemail', 'transfer', 'ivr_no_navigate'.
@@ -2576,6 +2919,16 @@ module Revox
2576
2919
  -> { Revox::Internal::Type::ArrayOf[Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::SMSLog] },
2577
2920
  nil?: true
2578
2921
 
2922
+ # @!attribute speech_events
2923
+ # Per-turn speech segments (VAD-derived) with timing and pipeline latencies,
2924
+ # ordered by started_speaking_at_ms. Empty for calls recorded before this was
2925
+ # tracked or for realtime sessions that don't emit them.
2926
+ #
2927
+ # @return [Array<Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::SpeechEvent>, nil]
2928
+ optional :speech_events,
2929
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::SpeechEvent] },
2930
+ nil?: true
2931
+
2579
2932
  # @!attribute structured_output
2580
2933
  # The data extracted from the call, using the structured output config from the
2581
2934
  # parent call object.
@@ -2593,7 +2946,7 @@ module Revox
2593
2946
  -> { Revox::Internal::Type::ArrayOf[Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::Transcript] },
2594
2947
  nil?: true
2595
2948
 
2596
- # @!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)
2949
+ # @!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)
2597
2950
  # Some parameter documentations has been truncated, see
2598
2951
  # {Revox::Models::CallRetrieveResponse::Call::LastCallAttempt} for more details.
2599
2952
  #
@@ -2608,6 +2961,12 @@ module Revox
2608
2961
  #
2609
2962
  # @param ended_at [Object] The time the call ended.
2610
2963
  #
2964
+ # @param handled_by_ai [Boolean] Whether the AI agent conducted the conversation on this attempt. False for a sil
2965
+ #
2966
+ # @param handled_by_human [Boolean] Whether a human operator conducted (part of) this attempt — a jump-in takeover o
2967
+ #
2968
+ # @param handled_by_user [Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::HandledByUser, nil] The team member responsible for following up on this call.
2969
+ #
2611
2970
  # @param phone_number [String] The phone number that was called. Formatted in E.164 format. Example: +123456789
2612
2971
  #
2613
2972
  # @param recording_url [String, nil] The URL of the audio recording of the call.
@@ -2620,6 +2979,8 @@ module Revox
2620
2979
  #
2621
2980
  # @param assistants_used [Array<String>, nil] Assistant node ids entered during this attempt, in traversal order.
2622
2981
  #
2982
+ # @param email_log [Array<Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::EmailLog>, nil] Notification emails sent in connection with the call, ordered oldest first (from
2983
+ #
2623
2984
  # @param end_reason [Symbol, Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::EndReason, nil] Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call', 'voic
2624
2985
  #
2625
2986
  # @param ended_by [Symbol, Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::EndedBy, nil] Who ended the call: 'agent' (AI agent), 'user' (caller/callee hung up), or 'syst
@@ -2628,6 +2989,8 @@ module Revox
2628
2989
  #
2629
2990
  # @param sms_log [Array<Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::SMSLog>, nil] Automatic SMS sent after the call (voicemail and after-call), ordered oldest fir
2630
2991
  #
2992
+ # @param speech_events [Array<Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::SpeechEvent>, nil] Per-turn speech segments (VAD-derived) with timing and pipeline latencies, order
2993
+ #
2631
2994
  # @param structured_output [Hash{Symbol=>Object}, nil] The data extracted from the call, using the structured output config from the pa
2632
2995
  #
2633
2996
  # @param transcript [Array<Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::Transcript>, nil] The live transcript of the call, built in real time.
@@ -2651,6 +3014,41 @@ module Revox
2651
3014
  # @return [Array<Symbol>]
2652
3015
  end
2653
3016
 
3017
+ # @see Revox::Models::CallRetrieveResponse::Call::LastCallAttempt#handled_by_user
3018
+ class HandledByUser < Revox::Internal::Type::BaseModel
3019
+ # @!attribute id
3020
+ # The database user id of the assignee.
3021
+ #
3022
+ # @return [String]
3023
+ required :id, String
3024
+
3025
+ # @!attribute email
3026
+ #
3027
+ # @return [String]
3028
+ required :email, String
3029
+
3030
+ # @!attribute first_name
3031
+ #
3032
+ # @return [String, nil]
3033
+ required :first_name, String, nil?: true
3034
+
3035
+ # @!attribute last_name
3036
+ #
3037
+ # @return [String, nil]
3038
+ required :last_name, String, nil?: true
3039
+
3040
+ # @!method initialize(id:, email:, first_name:, last_name:)
3041
+ # The team member responsible for following up on this call.
3042
+ #
3043
+ # @param id [String] The database user id of the assignee.
3044
+ #
3045
+ # @param email [String]
3046
+ #
3047
+ # @param first_name [String, nil]
3048
+ #
3049
+ # @param last_name [String, nil]
3050
+ end
3051
+
2654
3052
  # @see Revox::Models::CallRetrieveResponse::Call::LastCallAttempt#result
2655
3053
  module Result
2656
3054
  extend Revox::Internal::Type::Enum
@@ -2681,6 +3079,52 @@ module Revox
2681
3079
  # @return [Array<Symbol>]
2682
3080
  end
2683
3081
 
3082
+ class EmailLog < Revox::Internal::Type::BaseModel
3083
+ # @!attribute id
3084
+ #
3085
+ # @return [String]
3086
+ required :id, String
3087
+
3088
+ # @!attribute created_at
3089
+ # When the email was sent.
3090
+ #
3091
+ # @return [Object]
3092
+ required :created_at, Revox::Internal::Type::Unknown
3093
+
3094
+ # @!attribute from_address
3095
+ #
3096
+ # @return [String]
3097
+ required :from_address, String
3098
+
3099
+ # @!attribute resend_message_id
3100
+ #
3101
+ # @return [String, nil]
3102
+ required :resend_message_id, String, nil?: true
3103
+
3104
+ # @!attribute subject
3105
+ #
3106
+ # @return [String]
3107
+ required :subject, String
3108
+
3109
+ # @!attribute to_emails
3110
+ #
3111
+ # @return [Array<String>]
3112
+ required :to_emails, Revox::Internal::Type::ArrayOf[String]
3113
+
3114
+ # @!method initialize(id:, created_at:, from_address:, resend_message_id:, subject:, to_emails:)
3115
+ # @param id [String]
3116
+ #
3117
+ # @param created_at [Object] When the email was sent.
3118
+ #
3119
+ # @param from_address [String]
3120
+ #
3121
+ # @param resend_message_id [String, nil]
3122
+ #
3123
+ # @param subject [String]
3124
+ #
3125
+ # @param to_emails [Array<String>]
3126
+ end
3127
+
2684
3128
  # Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call',
2685
3129
  # 'voicemail', 'transfer', 'ivr_no_navigate'.
2686
3130
  #
@@ -2811,34 +3255,53 @@ module Revox
2811
3255
  # @return [String]
2812
3256
  required :message_body, String
2813
3257
 
2814
- # @!attribute to_phone_number
3258
+ # @!attribute provider
2815
3259
  #
2816
- # @return [String]
2817
- required :to_phone_number, String
3260
+ # @return [Symbol, Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::SMSLog::Provider]
3261
+ required :provider,
3262
+ enum: -> { Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::SMSLog::Provider }
2818
3263
 
2819
- # @!attribute twilio_message_sid
3264
+ # @!attribute provider_message_id
2820
3265
  #
2821
3266
  # @return [String, nil]
2822
- required :twilio_message_sid, String, nil?: true
3267
+ required :provider_message_id, String, nil?: true
3268
+
3269
+ # @!attribute to_phone_number
3270
+ #
3271
+ # @return [String]
3272
+ required :to_phone_number, String
2823
3273
 
2824
3274
  # @!attribute type
2825
3275
  #
2826
3276
  # @return [Symbol, Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::SMSLog::Type]
2827
3277
  required :type, enum: -> { Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::SMSLog::Type }
2828
3278
 
2829
- # @!method initialize(id:, created_at:, message_body:, to_phone_number:, twilio_message_sid:, type:)
3279
+ # @!method initialize(id:, created_at:, message_body:, provider:, provider_message_id:, to_phone_number:, type:)
2830
3280
  # @param id [String]
2831
3281
  #
2832
3282
  # @param created_at [Object] When the SMS was sent.
2833
3283
  #
2834
3284
  # @param message_body [String]
2835
3285
  #
2836
- # @param to_phone_number [String]
3286
+ # @param provider [Symbol, Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::SMSLog::Provider]
3287
+ #
3288
+ # @param provider_message_id [String, nil]
2837
3289
  #
2838
- # @param twilio_message_sid [String, nil]
3290
+ # @param to_phone_number [String]
2839
3291
  #
2840
3292
  # @param type [Symbol, Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::SMSLog::Type]
2841
3293
 
3294
+ # @see Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::SMSLog#provider
3295
+ module Provider
3296
+ extend Revox::Internal::Type::Enum
3297
+
3298
+ TWILIO = :twilio
3299
+ VONAGE = :vonage
3300
+
3301
+ # @!method self.values
3302
+ # @return [Array<Symbol>]
3303
+ end
3304
+
2842
3305
  # @see Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::SMSLog#type
2843
3306
  module Type
2844
3307
  extend Revox::Internal::Type::Enum
@@ -2852,6 +3315,126 @@ module Revox
2852
3315
  end
2853
3316
  end
2854
3317
 
3318
+ class SpeechEvent < Revox::Internal::Type::BaseModel
3319
+ # @!attribute id
3320
+ #
3321
+ # @return [String]
3322
+ required :id, String
3323
+
3324
+ # @!attribute is_real_turn
3325
+ # False when the segment was flagged as noise/blip rather than a meaningful turn.
3326
+ #
3327
+ # @return [Boolean]
3328
+ required :is_real_turn, Revox::Internal::Type::Boolean
3329
+
3330
+ # @!attribute llm_system_prompt
3331
+ # Agent-only: despite the name, the whole prompt the LLM was given for this turn —
3332
+ # system instructions plus conversation history — as JSON.
3333
+ #
3334
+ # @return [String, nil]
3335
+ required :llm_system_prompt, String, nil?: true
3336
+
3337
+ # @!attribute llm_ttft_ms
3338
+ # Agent-only: LLM time-to-first-token for the reply, in ms.
3339
+ #
3340
+ # @return [Float, nil]
3341
+ required :llm_ttft_ms, Float, nil?: true
3342
+
3343
+ # @!attribute llm_winner_model
3344
+ # Agent-only: the model that produced the reply — the winning leg when the LLM is
3345
+ # a race, which is also the model `llm_ttft_ms` describes.
3346
+ #
3347
+ # @return [String, nil]
3348
+ required :llm_winner_model, String, nil?: true
3349
+
3350
+ # @!attribute speaker
3351
+ # Who was speaking during this segment.
3352
+ #
3353
+ # @return [Symbol, Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::SpeechEvent::Speaker]
3354
+ required :speaker,
3355
+ enum: -> { Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::SpeechEvent::Speaker }
3356
+
3357
+ # @!attribute started_speaking_at_ms
3358
+ # Milliseconds since session start when speech began.
3359
+ #
3360
+ # @return [Float]
3361
+ required :started_speaking_at_ms, Float
3362
+
3363
+ # @!attribute stopped_speaking_at_ms
3364
+ # Milliseconds since session start when speech ended. Null when the session ended
3365
+ # before the turn closed.
3366
+ #
3367
+ # @return [Float, nil]
3368
+ required :stopped_speaking_at_ms, Float, nil?: true
3369
+
3370
+ # @!attribute stt_transcription_delay_ms
3371
+ # User-only: time from end-of-speech to final transcript, in ms.
3372
+ #
3373
+ # @return [Float, nil]
3374
+ required :stt_transcription_delay_ms, Float, nil?: true
3375
+
3376
+ # @!attribute transcript
3377
+ # Recognized text for this segment, when available.
3378
+ #
3379
+ # @return [String, nil]
3380
+ required :transcript, String, nil?: true
3381
+
3382
+ # @!attribute tts_ttfb_ms
3383
+ # Agent-only: TTS time-to-first-audio-byte for the reply, in ms.
3384
+ #
3385
+ # @return [Float, nil]
3386
+ required :tts_ttfb_ms, Float, nil?: true
3387
+
3388
+ # @!attribute was_cut
3389
+ # Agent-only: true when the agent's audio was interrupted (real or auto-resumed).
3390
+ # Null on user segments.
3391
+ #
3392
+ # @return [Boolean, nil]
3393
+ required :was_cut, Revox::Internal::Type::Boolean, nil?: true
3394
+
3395
+ # @!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:)
3396
+ # Some parameter documentations has been truncated, see
3397
+ # {Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::SpeechEvent} for
3398
+ # more details.
3399
+ #
3400
+ # @param id [String]
3401
+ #
3402
+ # @param is_real_turn [Boolean] False when the segment was flagged as noise/blip rather than a meaningful turn.
3403
+ #
3404
+ # @param llm_system_prompt [String, nil] Agent-only: despite the name, the whole prompt the LLM was given for this turn —
3405
+ #
3406
+ # @param llm_ttft_ms [Float, nil] Agent-only: LLM time-to-first-token for the reply, in ms.
3407
+ #
3408
+ # @param llm_winner_model [String, nil] Agent-only: the model that produced the reply — the winning leg when the LLM is
3409
+ #
3410
+ # @param speaker [Symbol, Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::SpeechEvent::Speaker] Who was speaking during this segment.
3411
+ #
3412
+ # @param started_speaking_at_ms [Float] Milliseconds since session start when speech began.
3413
+ #
3414
+ # @param stopped_speaking_at_ms [Float, nil] Milliseconds since session start when speech ended. Null when the session ended
3415
+ #
3416
+ # @param stt_transcription_delay_ms [Float, nil] User-only: time from end-of-speech to final transcript, in ms.
3417
+ #
3418
+ # @param transcript [String, nil] Recognized text for this segment, when available.
3419
+ #
3420
+ # @param tts_ttfb_ms [Float, nil] Agent-only: TTS time-to-first-audio-byte for the reply, in ms.
3421
+ #
3422
+ # @param was_cut [Boolean, nil] Agent-only: true when the agent's audio was interrupted (real or auto-resumed).
3423
+
3424
+ # Who was speaking during this segment.
3425
+ #
3426
+ # @see Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::SpeechEvent#speaker
3427
+ module Speaker
3428
+ extend Revox::Internal::Type::Enum
3429
+
3430
+ USER = :user
3431
+ AGENT = :agent
3432
+
3433
+ # @!method self.values
3434
+ # @return [Array<Symbol>]
3435
+ end
3436
+ end
3437
+
2855
3438
  class Transcript < Revox::Internal::Type::BaseModel
2856
3439
  # @!attribute content
2857
3440
  #
@@ -3086,6 +3669,7 @@ module Revox
3086
3669
  QUEUED_FOR_CALLING = :queued_for_calling
3087
3670
  CALLING = :calling
3088
3671
  POST_PROCESSING = :post_processing
3672
+ NOT_LAUNCHED = :not_launched
3089
3673
  SCHEDULED = :scheduled
3090
3674
  PAUSED = :paused
3091
3675
  COMPLETED = :completed
@@ -3106,9 +3690,6 @@ module Revox
3106
3690
  INTERESTED = :interested
3107
3691
  COMPLETED = :completed
3108
3692
  REQUESTED_CALLBACK_LATER = :requested_callback_later
3109
- REQUESTED_CALLBACK_NEW_NUMBER = :requested_callback_new_number
3110
- DO_NOT_CONTACT = :do_not_contact
3111
- AI_AVERSE = :ai_averse
3112
3693
 
3113
3694
  # @!method self.values
3114
3695
  # @return [Array<Symbol>]