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
@@ -224,7 +224,16 @@ module Revox
224
224
  # @return [String, nil]
225
225
  optional :outcome_summary, String, nil?: true
226
226
 
227
- # @!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)
227
+ # @!attribute slack_channel_ids
228
+ # Slack channels resolved from the agent prompt's own routing rules, when it
229
+ # defines any. Always a subset of the channels configured on the assistant. Null
230
+ # when the prompt defines no routing rules, in which case every configured channel
231
+ # is notified.
232
+ #
233
+ # @return [Array<String>, nil]
234
+ optional :slack_channel_ids, Revox::Internal::Type::ArrayOf[String], nil?: true
235
+
236
+ # @!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)
228
237
  # Some parameter documentations has been truncated, see
229
238
  # {Revox::Models::CampaignGetRowsResponse::Row::Call} for more details.
230
239
  #
@@ -282,6 +291,8 @@ module Revox
282
291
  # @param outcome [Symbol, Revox::Models::CampaignGetRowsResponse::Row::Call::Outcome, nil] Business outcome of the call. Null if not computed or no transcript.
283
292
  #
284
293
  # @param outcome_summary [String, nil] LLM explanation for the outcome, when outcome was computed from the transcript.
294
+ #
295
+ # @param slack_channel_ids [Array<String>, nil] Slack channels resolved from the agent prompt's own routing rules, when it defin
285
296
 
286
297
  # @see Revox::Models::CampaignGetRowsResponse::Row::Call#assignee
287
298
  class Assignee < Revox::Internal::Type::BaseModel
@@ -397,13 +408,6 @@ module Revox
397
408
  # @return [String, nil]
398
409
  required :email_notification_address, String, nil?: true
399
410
 
400
- # @!attribute email_notification_language
401
- # The language used for the notification email content. One of "en" or "fr".
402
- #
403
- # @return [Symbol, Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::EmailNotificationLanguage]
404
- required :email_notification_language,
405
- enum: -> { Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::EmailNotificationLanguage }
406
-
407
411
  # @!attribute email_notification_outcomes
408
412
  # Which call outcomes trigger an email notification. E.g. ["interested",
409
413
  # "completed", "none"]. Use "none" when outcome is null.
@@ -443,8 +447,8 @@ module Revox
443
447
  required :from_phone_number, String, nil?: true
444
448
 
445
449
  # @!attribute human_transfer_mode
446
- # Warm or cold transfer when transfer_phone_number is set; null when transfer is
447
- # not configured.
450
+ # Warm or cold transfer when transfer_destinations is non-empty; null when
451
+ # transfer is not configured.
448
452
  #
449
453
  # @return [Symbol, Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::HumanTransferMode, nil]
450
454
  required :human_transfer_mode,
@@ -502,6 +506,13 @@ module Revox
502
506
  -> { Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::Position },
503
507
  nil?: true
504
508
 
509
+ # @!attribute precall_lookup_url
510
+ # URL fetched before an inbound call is answered to resolve the assistant's prompt
511
+ # variables. Null when no lookup is configured.
512
+ #
513
+ # @return [String, nil]
514
+ required :precall_lookup_url, String, nil?: true
515
+
505
516
  # @!attribute prompt
506
517
  #
507
518
  # @return [String]
@@ -589,11 +600,14 @@ module Revox
589
600
  # @return [Float]
590
601
  required :thinking_sound_volume, Float
591
602
 
592
- # @!attribute transfer_phone_number
593
- # Phone number to transfer calls to when users request to speak to a human agent.
603
+ # @!attribute transfer_destinations
604
+ # Where calls can be transferred to when users ask to speak to a human. Null or
605
+ # empty when transfer is not configured.
594
606
  #
595
- # @return [String, nil]
596
- required :transfer_phone_number, String, nil?: true
607
+ # @return [Array<Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::TransferDestination>, nil]
608
+ required :transfer_destinations,
609
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::TransferDestination] },
610
+ nil?: true
597
611
 
598
612
  # @!attribute type
599
613
  #
@@ -656,6 +670,11 @@ module Revox
656
670
  optional :faq_items,
657
671
  -> { Revox::Internal::Type::ArrayOf[Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::FaqItem] }
658
672
 
673
+ # @!attribute is_inbound_receptionist
674
+ #
675
+ # @return [Boolean, nil]
676
+ optional :is_inbound_receptionist, Revox::Internal::Type::Boolean
677
+
659
678
  # @!attribute is_realestate_assistant
660
679
  #
661
680
  # @return [Boolean, nil]
@@ -666,7 +685,7 @@ module Revox
666
685
  # @return [Float, nil]
667
686
  optional :pending_faq_count, Float
668
687
 
669
- # @!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)
688
+ # @!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)
670
689
  # Some parameter documentations has been truncated, see
671
690
  # {Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant} for more details.
672
691
  #
@@ -692,8 +711,6 @@ module Revox
692
711
  #
693
712
  # @param email_notification_address [String, nil] Email address(es) to receive notifications when a call ends with a matching outc
694
713
  #
695
- # @param email_notification_language [Symbol, Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::EmailNotificationLanguage] The language used for the notification email content. One of "en" or "fr".
696
- #
697
714
  # @param email_notification_outcomes [Array<Symbol, Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::EmailNotificationOutcome>, nil] Which call outcomes trigger an email notification. E.g. ["interested", "complete
698
715
  #
699
716
  # @param end_of_call_sentence [String, nil]
@@ -706,7 +723,7 @@ module Revox
706
723
  #
707
724
  # @param from_phone_number [String, nil] Override the default outbound phone number for calls placed with this assistant.
708
725
  #
709
- # @param human_transfer_mode [Symbol, Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::HumanTransferMode, nil] Warm or cold transfer when transfer_phone_number is set; null when transfer is n
726
+ # @param human_transfer_mode [Symbol, Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::HumanTransferMode, nil] Warm or cold transfer when transfer_destinations is non-empty; null when transfe
710
727
  #
711
728
  # @param ivr_navigation_enabled [Boolean] Enable IVR navigation tools. When enabled, the assistant can send DTMF tones and
712
729
  #
@@ -724,6 +741,8 @@ module Revox
724
741
  #
725
742
  # @param position [Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::Position, nil]
726
743
  #
744
+ # @param precall_lookup_url [String, nil] URL fetched before an inbound call is answered to resolve the assistant's prompt
745
+ #
727
746
  # @param prompt [String]
728
747
  #
729
748
  # @param prompt_flow [Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::PromptFlow, nil]
@@ -748,7 +767,7 @@ module Revox
748
767
  #
749
768
  # @param thinking_sound_volume [Float] Volume of the thinking sound (0 = silent, 1 = max).
750
769
  #
751
- # @param transfer_phone_number [String, nil] Phone number to transfer calls to when users request to speak to a human agent.
770
+ # @param transfer_destinations [Array<Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::TransferDestination>, nil] Where calls can be transferred to when users ask to speak to a human. Null or em
752
771
  #
753
772
  # @param type [Symbol, Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::Type]
754
773
  #
@@ -770,6 +789,8 @@ module Revox
770
789
  #
771
790
  # @param faq_items [Array<Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::FaqItem>]
772
791
  #
792
+ # @param is_inbound_receptionist [Boolean]
793
+ #
773
794
  # @param is_realestate_assistant [Boolean]
774
795
  #
775
796
  # @param pending_faq_count [Float]
@@ -781,9 +802,6 @@ module Revox
781
802
  INTERESTED = :interested
782
803
  COMPLETED = :completed
783
804
  REQUESTED_CALLBACK_LATER = :requested_callback_later
784
- REQUESTED_CALLBACK_NEW_NUMBER = :requested_callback_new_number
785
- DO_NOT_CONTACT = :do_not_contact
786
- AI_AVERSE = :ai_averse
787
805
  NONE = :none
788
806
 
789
807
  # @!method self.values
@@ -917,7 +935,8 @@ module Revox
917
935
  required :calling_window_start_time, String
918
936
 
919
937
  # @!attribute retry_delay_seconds
920
- # Delay between retry attempts in seconds. Default: 7200 (2 hours).
938
+ # Delay between retry attempts in seconds. 0 retries as soon as the calling window
939
+ # allows. Default: 7200 (2 hours).
921
940
  #
922
941
  # @return [Integer]
923
942
  required :retry_delay_seconds, Integer
@@ -931,7 +950,7 @@ module Revox
931
950
  #
932
951
  # @param calling_window_start_time [String] Start time for the calling window in the recipient's timezone (or timezone_overr
933
952
  #
934
- # @param retry_delay_seconds [Integer] Delay between retry attempts in seconds. Default: 7200 (2 hours).
953
+ # @param retry_delay_seconds [Integer] Delay between retry attempts in seconds. 0 retries as soon as the calling window
935
954
  end
936
955
  end
937
956
 
@@ -1114,19 +1133,6 @@ module Revox
1114
1133
  end
1115
1134
  end
1116
1135
 
1117
- # The language used for the notification email content. One of "en" or "fr".
1118
- #
1119
- # @see Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant#email_notification_language
1120
- module EmailNotificationLanguage
1121
- extend Revox::Internal::Type::Enum
1122
-
1123
- EN = :en
1124
- FR = :fr
1125
-
1126
- # @!method self.values
1127
- # @return [Array<Symbol>]
1128
- end
1129
-
1130
1136
  module EmailNotificationOutcome
1131
1137
  extend Revox::Internal::Type::Enum
1132
1138
 
@@ -1134,9 +1140,6 @@ module Revox
1134
1140
  INTERESTED = :interested
1135
1141
  COMPLETED = :completed
1136
1142
  REQUESTED_CALLBACK_LATER = :requested_callback_later
1137
- REQUESTED_CALLBACK_NEW_NUMBER = :requested_callback_new_number
1138
- DO_NOT_CONTACT = :do_not_contact
1139
- AI_AVERSE = :ai_averse
1140
1143
  NONE = :none
1141
1144
 
1142
1145
  # @!method self.values
@@ -1155,8 +1158,8 @@ module Revox
1155
1158
  # @return [Array<Symbol>]
1156
1159
  end
1157
1160
 
1158
- # Warm or cold transfer when transfer_phone_number is set; null when transfer is
1159
- # not configured.
1161
+ # Warm or cold transfer when transfer_destinations is non-empty; null when
1162
+ # transfer is not configured.
1160
1163
  #
1161
1164
  # @see Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant#human_transfer_mode
1162
1165
  module HumanTransferMode
@@ -1448,11 +1451,14 @@ module Revox
1448
1451
 
1449
1452
  # @see Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant#slack
1450
1453
  class Slack < Revox::Internal::Type::BaseModel
1451
- # @!attribute channel_id
1452
- # The Slack channel ID where the notification will be posted.
1454
+ # @!attribute channels
1455
+ # The Slack channels eligible to receive the notification. When more than one is
1456
+ # configured, the agent prompt may define routing rules to narrow it down per
1457
+ # call; with no such rules every channel here is notified.
1453
1458
  #
1454
- # @return [String]
1455
- required :channel_id, String
1459
+ # @return [Array<Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::Slack::Channel>]
1460
+ required :channels,
1461
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::Slack::Channel] }
1456
1462
 
1457
1463
  # @!attribute connection_id
1458
1464
  # The Nango connection ID linking the org's Slack workspace to Revox.
@@ -1468,38 +1474,54 @@ module Revox
1468
1474
  required :outcomes,
1469
1475
  -> { Revox::Internal::Type::ArrayOf[enum: Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::Slack::Outcome] }
1470
1476
 
1471
- # @!attribute channel_name
1472
- # Human-readable Slack channel name, cached for display in the UI.
1473
- #
1474
- # @return [String, nil]
1475
- optional :channel_name, String, nil?: true
1476
-
1477
1477
  # @!attribute template
1478
1478
  # Optional message template. Supports {{summary}}, {{outcome}}, {{phone}},
1479
1479
  # {{call_url}}, {{assistant_name}}, {{campaign_name}}, {{first_name}},
1480
- # {{last_name}}, {{email}}, {{company}}, {{contact_name}}, {{contact_line}}, plus
1481
- # prompt_variables and structured_output keys. When null/empty a default template
1482
- # is used.
1480
+ # {{last_name}}, {{email}}, {{company}}, {{job_title}}, {{contact_name}},
1481
+ # {{contact_line}}, plus prompt_variables and structured_output keys. When
1482
+ # null/empty a default template is used.
1483
1483
  #
1484
1484
  # @return [String, nil]
1485
1485
  optional :template, String, nil?: true
1486
1486
 
1487
- # @!method initialize(channel_id:, connection_id:, outcomes:, channel_name: nil, template: nil)
1487
+ # @!method initialize(channels:, connection_id:, outcomes:, template: nil)
1488
1488
  # Some parameter documentations has been truncated, see
1489
1489
  # {Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::Slack} for more
1490
1490
  # details.
1491
1491
  #
1492
- # @param channel_id [String] The Slack channel ID where the notification will be posted.
1492
+ # @param channels [Array<Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::Slack::Channel>] The Slack channels eligible to receive the notification. When more than one is c
1493
1493
  #
1494
1494
  # @param connection_id [String] The Nango connection ID linking the org's Slack workspace to Revox.
1495
1495
  #
1496
1496
  # @param outcomes [Array<Symbol, Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::Slack::Outcome>] Which call outcomes trigger a Slack notification (e.g. ['interested', 'none']).
1497
1497
  #
1498
- # @param channel_name [String, nil] Human-readable Slack channel name, cached for display in the UI.
1499
- #
1500
1498
  # @param template [String, nil] Optional message template. Supports {{summary}}, {{outcome}}, {{phone}},
1501
1499
  # {{call\_
1502
1500
 
1501
+ class Channel < Revox::Internal::Type::BaseModel
1502
+ # @!attribute id
1503
+ # The Slack channel ID (e.g. 'C01234567').
1504
+ #
1505
+ # @return [String]
1506
+ required :id, String
1507
+
1508
+ # @!attribute name
1509
+ # Human-readable Slack channel name, cached for display in the UI and given to the
1510
+ # LLM when the agent prompt routes by channel name.
1511
+ #
1512
+ # @return [String, nil]
1513
+ optional :name, String, nil?: true
1514
+
1515
+ # @!method initialize(id:, name: nil)
1516
+ # Some parameter documentations has been truncated, see
1517
+ # {Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::Slack::Channel}
1518
+ # for more details.
1519
+ #
1520
+ # @param id [String] The Slack channel ID (e.g. 'C01234567').
1521
+ #
1522
+ # @param name [String, nil] Human-readable Slack channel name, cached for display in the UI and given to the
1523
+ end
1524
+
1503
1525
  module Outcome
1504
1526
  extend Revox::Internal::Type::Enum
1505
1527
 
@@ -1507,9 +1529,6 @@ module Revox
1507
1529
  INTERESTED = :interested
1508
1530
  COMPLETED = :completed
1509
1531
  REQUESTED_CALLBACK_LATER = :requested_callback_later
1510
- REQUESTED_CALLBACK_NEW_NUMBER = :requested_callback_new_number
1511
- DO_NOT_CONTACT = :do_not_contact
1512
- AI_AVERSE = :ai_averse
1513
1532
  NONE = :none
1514
1533
 
1515
1534
  # @!method self.values
@@ -1637,6 +1656,22 @@ module Revox
1637
1656
  # @return [Array<Symbol>]
1638
1657
  end
1639
1658
 
1659
+ class TransferDestination < Revox::Internal::Type::BaseModel
1660
+ # @!attribute label
1661
+ #
1662
+ # @return [String]
1663
+ required :label, String
1664
+
1665
+ # @!attribute phone_number
1666
+ #
1667
+ # @return [String]
1668
+ required :phone_number, String
1669
+
1670
+ # @!method initialize(label:, phone_number:)
1671
+ # @param label [String]
1672
+ # @param phone_number [String]
1673
+ end
1674
+
1640
1675
  # @see Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant#type
1641
1676
  module Type
1642
1677
  extend Revox::Internal::Type::Enum
@@ -1673,7 +1708,7 @@ module Revox
1673
1708
 
1674
1709
  # @!attribute speed
1675
1710
  # The speed of the voice. Range depends on provider: Cartesia 0.6–1.5, ElevenLabs
1676
- # 0.7–1.2. Default is 1.0.
1711
+ # 0.7–1.2, Gradium 0.6–1.5. Default is 1.0.
1677
1712
  #
1678
1713
  # @return [Float, nil]
1679
1714
  optional :speed, Float
@@ -1708,6 +1743,7 @@ module Revox
1708
1743
 
1709
1744
  CARTESIA = :cartesia
1710
1745
  ELEVENLABS = :elevenlabs
1746
+ GRADIUM = :gradium
1711
1747
 
1712
1748
  # @!method self.values
1713
1749
  # @return [Array<Symbol>]
@@ -1823,9 +1859,6 @@ module Revox
1823
1859
  INTERESTED = :interested
1824
1860
  COMPLETED = :completed
1825
1861
  REQUESTED_CALLBACK_LATER = :requested_callback_later
1826
- REQUESTED_CALLBACK_NEW_NUMBER = :requested_callback_new_number
1827
- DO_NOT_CONTACT = :do_not_contact
1828
- AI_AVERSE = :ai_averse
1829
1862
  NONE = :none
1830
1863
 
1831
1864
  # @!method self.values
@@ -1942,6 +1975,29 @@ module Revox
1942
1975
  # @return [Object]
1943
1976
  required :ended_at, Revox::Internal::Type::Unknown
1944
1977
 
1978
+ # @!attribute handled_by_ai
1979
+ # Whether the AI agent conducted the conversation on this attempt. False for a
1980
+ # silent speed-dial probe (whose agent only detects a human) and for attempts that
1981
+ # were never answered.
1982
+ #
1983
+ # @return [Boolean]
1984
+ required :handled_by_ai, Revox::Internal::Type::Boolean
1985
+
1986
+ # @!attribute handled_by_human
1987
+ # Whether a human operator conducted (part of) this attempt — a jump-in takeover
1988
+ # or a speed-dial operator connection (both stamp human_takeover_at).
1989
+ #
1990
+ # @return [Boolean]
1991
+ required :handled_by_human, Revox::Internal::Type::Boolean
1992
+
1993
+ # @!attribute handled_by_user
1994
+ # The team member responsible for following up on this call.
1995
+ #
1996
+ # @return [Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::HandledByUser, nil]
1997
+ required :handled_by_user,
1998
+ -> { Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::HandledByUser },
1999
+ nil?: true
2000
+
1945
2001
  # @!attribute phone_number
1946
2002
  # The phone number that was called. Formatted in E.164 format. Example:
1947
2003
  # +1234567890
@@ -1980,6 +2036,15 @@ module Revox
1980
2036
  # @return [Array<String>, nil]
1981
2037
  optional :assistants_used, Revox::Internal::Type::ArrayOf[String], nil?: true
1982
2038
 
2039
+ # @!attribute email_log
2040
+ # Notification emails sent in connection with the call, ordered oldest first
2041
+ # (from/to addresses, subject, sent time).
2042
+ #
2043
+ # @return [Array<Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::EmailLog>, nil]
2044
+ optional :email_log,
2045
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::EmailLog] },
2046
+ nil?: true
2047
+
1983
2048
  # @!attribute end_reason
1984
2049
  # Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call',
1985
2050
  # 'voicemail', 'transfer', 'ivr_no_navigate'.
@@ -2017,6 +2082,16 @@ module Revox
2017
2082
  -> { Revox::Internal::Type::ArrayOf[Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::SMSLog] },
2018
2083
  nil?: true
2019
2084
 
2085
+ # @!attribute speech_events
2086
+ # Per-turn speech segments (VAD-derived) with timing and pipeline latencies,
2087
+ # ordered by started_speaking_at_ms. Empty for calls recorded before this was
2088
+ # tracked or for realtime sessions that don't emit them.
2089
+ #
2090
+ # @return [Array<Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::SpeechEvent>, nil]
2091
+ optional :speech_events,
2092
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::SpeechEvent] },
2093
+ nil?: true
2094
+
2020
2095
  # @!attribute structured_output
2021
2096
  # The data extracted from the call, using the structured output config from the
2022
2097
  # parent call object.
@@ -2034,7 +2109,7 @@ module Revox
2034
2109
  -> { Revox::Internal::Type::ArrayOf[Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::Transcript] },
2035
2110
  nil?: true
2036
2111
 
2037
- # @!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)
2112
+ # @!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)
2038
2113
  # Some parameter documentations has been truncated, see
2039
2114
  # {Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt} for more
2040
2115
  # details.
@@ -2050,6 +2125,12 @@ module Revox
2050
2125
  #
2051
2126
  # @param ended_at [Object] The time the call ended.
2052
2127
  #
2128
+ # @param handled_by_ai [Boolean] Whether the AI agent conducted the conversation on this attempt. False for a sil
2129
+ #
2130
+ # @param handled_by_human [Boolean] Whether a human operator conducted (part of) this attempt — a jump-in takeover o
2131
+ #
2132
+ # @param handled_by_user [Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::HandledByUser, nil] The team member responsible for following up on this call.
2133
+ #
2053
2134
  # @param phone_number [String] The phone number that was called. Formatted in E.164 format. Example: +123456789
2054
2135
  #
2055
2136
  # @param recording_url [String, nil] The URL of the audio recording of the call.
@@ -2062,6 +2143,8 @@ module Revox
2062
2143
  #
2063
2144
  # @param assistants_used [Array<String>, nil] Assistant node ids entered during this attempt, in traversal order.
2064
2145
  #
2146
+ # @param email_log [Array<Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::EmailLog>, nil] Notification emails sent in connection with the call, ordered oldest first (from
2147
+ #
2065
2148
  # @param end_reason [Symbol, Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::EndReason, nil] Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call', 'voic
2066
2149
  #
2067
2150
  # @param ended_by [Symbol, Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::EndedBy, nil] Who ended the call: 'agent' (AI agent), 'user' (caller/callee hung up), or 'syst
@@ -2070,6 +2153,8 @@ module Revox
2070
2153
  #
2071
2154
  # @param sms_log [Array<Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::SMSLog>, nil] Automatic SMS sent after the call (voicemail and after-call), ordered oldest fir
2072
2155
  #
2156
+ # @param speech_events [Array<Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::SpeechEvent>, nil] Per-turn speech segments (VAD-derived) with timing and pipeline latencies, order
2157
+ #
2073
2158
  # @param structured_output [Hash{Symbol=>Object}, nil] The data extracted from the call, using the structured output config from the pa
2074
2159
  #
2075
2160
  # @param transcript [Array<Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::Transcript>, nil] The live transcript of the call, built in real time.
@@ -2093,6 +2178,41 @@ module Revox
2093
2178
  # @return [Array<Symbol>]
2094
2179
  end
2095
2180
 
2181
+ # @see Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt#handled_by_user
2182
+ class HandledByUser < Revox::Internal::Type::BaseModel
2183
+ # @!attribute id
2184
+ # The database user id of the assignee.
2185
+ #
2186
+ # @return [String]
2187
+ required :id, String
2188
+
2189
+ # @!attribute email
2190
+ #
2191
+ # @return [String]
2192
+ required :email, String
2193
+
2194
+ # @!attribute first_name
2195
+ #
2196
+ # @return [String, nil]
2197
+ required :first_name, String, nil?: true
2198
+
2199
+ # @!attribute last_name
2200
+ #
2201
+ # @return [String, nil]
2202
+ required :last_name, String, nil?: true
2203
+
2204
+ # @!method initialize(id:, email:, first_name:, last_name:)
2205
+ # The team member responsible for following up on this call.
2206
+ #
2207
+ # @param id [String] The database user id of the assignee.
2208
+ #
2209
+ # @param email [String]
2210
+ #
2211
+ # @param first_name [String, nil]
2212
+ #
2213
+ # @param last_name [String, nil]
2214
+ end
2215
+
2096
2216
  # @see Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt#result
2097
2217
  module Result
2098
2218
  extend Revox::Internal::Type::Enum
@@ -2123,6 +2243,52 @@ module Revox
2123
2243
  # @return [Array<Symbol>]
2124
2244
  end
2125
2245
 
2246
+ class EmailLog < Revox::Internal::Type::BaseModel
2247
+ # @!attribute id
2248
+ #
2249
+ # @return [String]
2250
+ required :id, String
2251
+
2252
+ # @!attribute created_at
2253
+ # When the email was sent.
2254
+ #
2255
+ # @return [Object]
2256
+ required :created_at, Revox::Internal::Type::Unknown
2257
+
2258
+ # @!attribute from_address
2259
+ #
2260
+ # @return [String]
2261
+ required :from_address, String
2262
+
2263
+ # @!attribute resend_message_id
2264
+ #
2265
+ # @return [String, nil]
2266
+ required :resend_message_id, String, nil?: true
2267
+
2268
+ # @!attribute subject
2269
+ #
2270
+ # @return [String]
2271
+ required :subject, String
2272
+
2273
+ # @!attribute to_emails
2274
+ #
2275
+ # @return [Array<String>]
2276
+ required :to_emails, Revox::Internal::Type::ArrayOf[String]
2277
+
2278
+ # @!method initialize(id:, created_at:, from_address:, resend_message_id:, subject:, to_emails:)
2279
+ # @param id [String]
2280
+ #
2281
+ # @param created_at [Object] When the email was sent.
2282
+ #
2283
+ # @param from_address [String]
2284
+ #
2285
+ # @param resend_message_id [String, nil]
2286
+ #
2287
+ # @param subject [String]
2288
+ #
2289
+ # @param to_emails [Array<String>]
2290
+ end
2291
+
2126
2292
  # Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call',
2127
2293
  # 'voicemail', 'transfer', 'ivr_no_navigate'.
2128
2294
  #
@@ -2253,34 +2419,53 @@ module Revox
2253
2419
  # @return [String]
2254
2420
  required :message_body, String
2255
2421
 
2256
- # @!attribute to_phone_number
2422
+ # @!attribute provider
2257
2423
  #
2258
- # @return [String]
2259
- required :to_phone_number, String
2424
+ # @return [Symbol, Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::SMSLog::Provider]
2425
+ required :provider,
2426
+ enum: -> { Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::SMSLog::Provider }
2260
2427
 
2261
- # @!attribute twilio_message_sid
2428
+ # @!attribute provider_message_id
2262
2429
  #
2263
2430
  # @return [String, nil]
2264
- required :twilio_message_sid, String, nil?: true
2431
+ required :provider_message_id, String, nil?: true
2432
+
2433
+ # @!attribute to_phone_number
2434
+ #
2435
+ # @return [String]
2436
+ required :to_phone_number, String
2265
2437
 
2266
2438
  # @!attribute type
2267
2439
  #
2268
2440
  # @return [Symbol, Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::SMSLog::Type]
2269
2441
  required :type, enum: -> { Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::SMSLog::Type }
2270
2442
 
2271
- # @!method initialize(id:, created_at:, message_body:, to_phone_number:, twilio_message_sid:, type:)
2443
+ # @!method initialize(id:, created_at:, message_body:, provider:, provider_message_id:, to_phone_number:, type:)
2272
2444
  # @param id [String]
2273
2445
  #
2274
2446
  # @param created_at [Object] When the SMS was sent.
2275
2447
  #
2276
2448
  # @param message_body [String]
2277
2449
  #
2278
- # @param to_phone_number [String]
2450
+ # @param provider [Symbol, Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::SMSLog::Provider]
2279
2451
  #
2280
- # @param twilio_message_sid [String, nil]
2452
+ # @param provider_message_id [String, nil]
2453
+ #
2454
+ # @param to_phone_number [String]
2281
2455
  #
2282
2456
  # @param type [Symbol, Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::SMSLog::Type]
2283
2457
 
2458
+ # @see Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::SMSLog#provider
2459
+ module Provider
2460
+ extend Revox::Internal::Type::Enum
2461
+
2462
+ TWILIO = :twilio
2463
+ VONAGE = :vonage
2464
+
2465
+ # @!method self.values
2466
+ # @return [Array<Symbol>]
2467
+ end
2468
+
2284
2469
  # @see Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::SMSLog#type
2285
2470
  module Type
2286
2471
  extend Revox::Internal::Type::Enum
@@ -2294,6 +2479,126 @@ module Revox
2294
2479
  end
2295
2480
  end
2296
2481
 
2482
+ class SpeechEvent < Revox::Internal::Type::BaseModel
2483
+ # @!attribute id
2484
+ #
2485
+ # @return [String]
2486
+ required :id, String
2487
+
2488
+ # @!attribute is_real_turn
2489
+ # False when the segment was flagged as noise/blip rather than a meaningful turn.
2490
+ #
2491
+ # @return [Boolean]
2492
+ required :is_real_turn, Revox::Internal::Type::Boolean
2493
+
2494
+ # @!attribute llm_system_prompt
2495
+ # Agent-only: despite the name, the whole prompt the LLM was given for this turn —
2496
+ # system instructions plus conversation history — as JSON.
2497
+ #
2498
+ # @return [String, nil]
2499
+ required :llm_system_prompt, String, nil?: true
2500
+
2501
+ # @!attribute llm_ttft_ms
2502
+ # Agent-only: LLM time-to-first-token for the reply, in ms.
2503
+ #
2504
+ # @return [Float, nil]
2505
+ required :llm_ttft_ms, Float, nil?: true
2506
+
2507
+ # @!attribute llm_winner_model
2508
+ # Agent-only: the model that produced the reply — the winning leg when the LLM is
2509
+ # a race, which is also the model `llm_ttft_ms` describes.
2510
+ #
2511
+ # @return [String, nil]
2512
+ required :llm_winner_model, String, nil?: true
2513
+
2514
+ # @!attribute speaker
2515
+ # Who was speaking during this segment.
2516
+ #
2517
+ # @return [Symbol, Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::SpeechEvent::Speaker]
2518
+ required :speaker,
2519
+ enum: -> { Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::SpeechEvent::Speaker }
2520
+
2521
+ # @!attribute started_speaking_at_ms
2522
+ # Milliseconds since session start when speech began.
2523
+ #
2524
+ # @return [Float]
2525
+ required :started_speaking_at_ms, Float
2526
+
2527
+ # @!attribute stopped_speaking_at_ms
2528
+ # Milliseconds since session start when speech ended. Null when the session ended
2529
+ # before the turn closed.
2530
+ #
2531
+ # @return [Float, nil]
2532
+ required :stopped_speaking_at_ms, Float, nil?: true
2533
+
2534
+ # @!attribute stt_transcription_delay_ms
2535
+ # User-only: time from end-of-speech to final transcript, in ms.
2536
+ #
2537
+ # @return [Float, nil]
2538
+ required :stt_transcription_delay_ms, Float, nil?: true
2539
+
2540
+ # @!attribute transcript
2541
+ # Recognized text for this segment, when available.
2542
+ #
2543
+ # @return [String, nil]
2544
+ required :transcript, String, nil?: true
2545
+
2546
+ # @!attribute tts_ttfb_ms
2547
+ # Agent-only: TTS time-to-first-audio-byte for the reply, in ms.
2548
+ #
2549
+ # @return [Float, nil]
2550
+ required :tts_ttfb_ms, Float, nil?: true
2551
+
2552
+ # @!attribute was_cut
2553
+ # Agent-only: true when the agent's audio was interrupted (real or auto-resumed).
2554
+ # Null on user segments.
2555
+ #
2556
+ # @return [Boolean, nil]
2557
+ required :was_cut, Revox::Internal::Type::Boolean, nil?: true
2558
+
2559
+ # @!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:)
2560
+ # Some parameter documentations has been truncated, see
2561
+ # {Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::SpeechEvent}
2562
+ # for more details.
2563
+ #
2564
+ # @param id [String]
2565
+ #
2566
+ # @param is_real_turn [Boolean] False when the segment was flagged as noise/blip rather than a meaningful turn.
2567
+ #
2568
+ # @param llm_system_prompt [String, nil] Agent-only: despite the name, the whole prompt the LLM was given for this turn —
2569
+ #
2570
+ # @param llm_ttft_ms [Float, nil] Agent-only: LLM time-to-first-token for the reply, in ms.
2571
+ #
2572
+ # @param llm_winner_model [String, nil] Agent-only: the model that produced the reply — the winning leg when the LLM is
2573
+ #
2574
+ # @param speaker [Symbol, Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::SpeechEvent::Speaker] Who was speaking during this segment.
2575
+ #
2576
+ # @param started_speaking_at_ms [Float] Milliseconds since session start when speech began.
2577
+ #
2578
+ # @param stopped_speaking_at_ms [Float, nil] Milliseconds since session start when speech ended. Null when the session ended
2579
+ #
2580
+ # @param stt_transcription_delay_ms [Float, nil] User-only: time from end-of-speech to final transcript, in ms.
2581
+ #
2582
+ # @param transcript [String, nil] Recognized text for this segment, when available.
2583
+ #
2584
+ # @param tts_ttfb_ms [Float, nil] Agent-only: TTS time-to-first-audio-byte for the reply, in ms.
2585
+ #
2586
+ # @param was_cut [Boolean, nil] Agent-only: true when the agent's audio was interrupted (real or auto-resumed).
2587
+
2588
+ # Who was speaking during this segment.
2589
+ #
2590
+ # @see Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::SpeechEvent#speaker
2591
+ module Speaker
2592
+ extend Revox::Internal::Type::Enum
2593
+
2594
+ USER = :user
2595
+ AGENT = :agent
2596
+
2597
+ # @!method self.values
2598
+ # @return [Array<Symbol>]
2599
+ end
2600
+ end
2601
+
2297
2602
  class Transcript < Revox::Internal::Type::BaseModel
2298
2603
  # @!attribute content
2299
2604
  #
@@ -2455,7 +2760,8 @@ module Revox
2455
2760
  required :calling_window_start_time, String
2456
2761
 
2457
2762
  # @!attribute retry_delay_seconds
2458
- # Delay between retry attempts in seconds. Default: 7200 (2 hours).
2763
+ # Delay between retry attempts in seconds. 0 retries as soon as the calling window
2764
+ # allows. Default: 7200 (2 hours).
2459
2765
  #
2460
2766
  # @return [Integer]
2461
2767
  required :retry_delay_seconds, Integer
@@ -2469,7 +2775,7 @@ module Revox
2469
2775
  #
2470
2776
  # @param calling_window_start_time [String] Start time for the calling window in the recipient's timezone (or timezone_overr
2471
2777
  #
2472
- # @param retry_delay_seconds [Integer] Delay between retry attempts in seconds. Default: 7200 (2 hours).
2778
+ # @param retry_delay_seconds [Integer] Delay between retry attempts in seconds. 0 retries as soon as the calling window
2473
2779
  end
2474
2780
  end
2475
2781
 
@@ -2507,18 +2813,24 @@ module Revox
2507
2813
  # @return [String, nil]
2508
2814
  required :first_name, String, nil?: true
2509
2815
 
2816
+ # @!attribute job_title
2817
+ #
2818
+ # @return [String, nil]
2819
+ required :job_title, String, nil?: true
2820
+
2510
2821
  # @!attribute last_name
2511
2822
  #
2512
2823
  # @return [String, nil]
2513
2824
  required :last_name, String, nil?: true
2514
2825
 
2515
- # @!method initialize(company:, email:, first_name:, last_name:)
2826
+ # @!method initialize(company:, email:, first_name:, job_title:, last_name:)
2516
2827
  # Magic contact variables (prospect identity) extracted from the call's input data
2517
2828
  # and transcript.
2518
2829
  #
2519
2830
  # @param company [String, nil]
2520
2831
  # @param email [String, nil]
2521
2832
  # @param first_name [String, nil]
2833
+ # @param job_title [String, nil]
2522
2834
  # @param last_name [String, nil]
2523
2835
  end
2524
2836
 
@@ -2563,6 +2875,29 @@ module Revox
2563
2875
  # @return [Object]
2564
2876
  required :ended_at, Revox::Internal::Type::Unknown
2565
2877
 
2878
+ # @!attribute handled_by_ai
2879
+ # Whether the AI agent conducted the conversation on this attempt. False for a
2880
+ # silent speed-dial probe (whose agent only detects a human) and for attempts that
2881
+ # were never answered.
2882
+ #
2883
+ # @return [Boolean]
2884
+ required :handled_by_ai, Revox::Internal::Type::Boolean
2885
+
2886
+ # @!attribute handled_by_human
2887
+ # Whether a human operator conducted (part of) this attempt — a jump-in takeover
2888
+ # or a speed-dial operator connection (both stamp human_takeover_at).
2889
+ #
2890
+ # @return [Boolean]
2891
+ required :handled_by_human, Revox::Internal::Type::Boolean
2892
+
2893
+ # @!attribute handled_by_user
2894
+ # The team member responsible for following up on this call.
2895
+ #
2896
+ # @return [Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::HandledByUser, nil]
2897
+ required :handled_by_user,
2898
+ -> { Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::HandledByUser },
2899
+ nil?: true
2900
+
2566
2901
  # @!attribute phone_number
2567
2902
  # The phone number that was called. Formatted in E.164 format. Example:
2568
2903
  # +1234567890
@@ -2601,6 +2936,15 @@ module Revox
2601
2936
  # @return [Array<String>, nil]
2602
2937
  optional :assistants_used, Revox::Internal::Type::ArrayOf[String], nil?: true
2603
2938
 
2939
+ # @!attribute email_log
2940
+ # Notification emails sent in connection with the call, ordered oldest first
2941
+ # (from/to addresses, subject, sent time).
2942
+ #
2943
+ # @return [Array<Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::EmailLog>, nil]
2944
+ optional :email_log,
2945
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::EmailLog] },
2946
+ nil?: true
2947
+
2604
2948
  # @!attribute end_reason
2605
2949
  # Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call',
2606
2950
  # 'voicemail', 'transfer', 'ivr_no_navigate'.
@@ -2638,6 +2982,16 @@ module Revox
2638
2982
  -> { Revox::Internal::Type::ArrayOf[Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::SMSLog] },
2639
2983
  nil?: true
2640
2984
 
2985
+ # @!attribute speech_events
2986
+ # Per-turn speech segments (VAD-derived) with timing and pipeline latencies,
2987
+ # ordered by started_speaking_at_ms. Empty for calls recorded before this was
2988
+ # tracked or for realtime sessions that don't emit them.
2989
+ #
2990
+ # @return [Array<Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::SpeechEvent>, nil]
2991
+ optional :speech_events,
2992
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::SpeechEvent] },
2993
+ nil?: true
2994
+
2641
2995
  # @!attribute structured_output
2642
2996
  # The data extracted from the call, using the structured output config from the
2643
2997
  # parent call object.
@@ -2655,7 +3009,7 @@ module Revox
2655
3009
  -> { Revox::Internal::Type::ArrayOf[Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::Transcript] },
2656
3010
  nil?: true
2657
3011
 
2658
- # @!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)
3012
+ # @!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)
2659
3013
  # Some parameter documentations has been truncated, see
2660
3014
  # {Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt} for more
2661
3015
  # details.
@@ -2671,6 +3025,12 @@ module Revox
2671
3025
  #
2672
3026
  # @param ended_at [Object] The time the call ended.
2673
3027
  #
3028
+ # @param handled_by_ai [Boolean] Whether the AI agent conducted the conversation on this attempt. False for a sil
3029
+ #
3030
+ # @param handled_by_human [Boolean] Whether a human operator conducted (part of) this attempt — a jump-in takeover o
3031
+ #
3032
+ # @param handled_by_user [Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::HandledByUser, nil] The team member responsible for following up on this call.
3033
+ #
2674
3034
  # @param phone_number [String] The phone number that was called. Formatted in E.164 format. Example: +123456789
2675
3035
  #
2676
3036
  # @param recording_url [String, nil] The URL of the audio recording of the call.
@@ -2683,6 +3043,8 @@ module Revox
2683
3043
  #
2684
3044
  # @param assistants_used [Array<String>, nil] Assistant node ids entered during this attempt, in traversal order.
2685
3045
  #
3046
+ # @param email_log [Array<Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::EmailLog>, nil] Notification emails sent in connection with the call, ordered oldest first (from
3047
+ #
2686
3048
  # @param end_reason [Symbol, Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::EndReason, nil] Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call', 'voic
2687
3049
  #
2688
3050
  # @param ended_by [Symbol, Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::EndedBy, nil] Who ended the call: 'agent' (AI agent), 'user' (caller/callee hung up), or 'syst
@@ -2691,6 +3053,8 @@ module Revox
2691
3053
  #
2692
3054
  # @param sms_log [Array<Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::SMSLog>, nil] Automatic SMS sent after the call (voicemail and after-call), ordered oldest fir
2693
3055
  #
3056
+ # @param speech_events [Array<Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::SpeechEvent>, nil] Per-turn speech segments (VAD-derived) with timing and pipeline latencies, order
3057
+ #
2694
3058
  # @param structured_output [Hash{Symbol=>Object}, nil] The data extracted from the call, using the structured output config from the pa
2695
3059
  #
2696
3060
  # @param transcript [Array<Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::Transcript>, nil] The live transcript of the call, built in real time.
@@ -2714,6 +3078,41 @@ module Revox
2714
3078
  # @return [Array<Symbol>]
2715
3079
  end
2716
3080
 
3081
+ # @see Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt#handled_by_user
3082
+ class HandledByUser < Revox::Internal::Type::BaseModel
3083
+ # @!attribute id
3084
+ # The database user id of the assignee.
3085
+ #
3086
+ # @return [String]
3087
+ required :id, String
3088
+
3089
+ # @!attribute email
3090
+ #
3091
+ # @return [String]
3092
+ required :email, String
3093
+
3094
+ # @!attribute first_name
3095
+ #
3096
+ # @return [String, nil]
3097
+ required :first_name, String, nil?: true
3098
+
3099
+ # @!attribute last_name
3100
+ #
3101
+ # @return [String, nil]
3102
+ required :last_name, String, nil?: true
3103
+
3104
+ # @!method initialize(id:, email:, first_name:, last_name:)
3105
+ # The team member responsible for following up on this call.
3106
+ #
3107
+ # @param id [String] The database user id of the assignee.
3108
+ #
3109
+ # @param email [String]
3110
+ #
3111
+ # @param first_name [String, nil]
3112
+ #
3113
+ # @param last_name [String, nil]
3114
+ end
3115
+
2717
3116
  # @see Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt#result
2718
3117
  module Result
2719
3118
  extend Revox::Internal::Type::Enum
@@ -2744,6 +3143,52 @@ module Revox
2744
3143
  # @return [Array<Symbol>]
2745
3144
  end
2746
3145
 
3146
+ class EmailLog < Revox::Internal::Type::BaseModel
3147
+ # @!attribute id
3148
+ #
3149
+ # @return [String]
3150
+ required :id, String
3151
+
3152
+ # @!attribute created_at
3153
+ # When the email was sent.
3154
+ #
3155
+ # @return [Object]
3156
+ required :created_at, Revox::Internal::Type::Unknown
3157
+
3158
+ # @!attribute from_address
3159
+ #
3160
+ # @return [String]
3161
+ required :from_address, String
3162
+
3163
+ # @!attribute resend_message_id
3164
+ #
3165
+ # @return [String, nil]
3166
+ required :resend_message_id, String, nil?: true
3167
+
3168
+ # @!attribute subject
3169
+ #
3170
+ # @return [String]
3171
+ required :subject, String
3172
+
3173
+ # @!attribute to_emails
3174
+ #
3175
+ # @return [Array<String>]
3176
+ required :to_emails, Revox::Internal::Type::ArrayOf[String]
3177
+
3178
+ # @!method initialize(id:, created_at:, from_address:, resend_message_id:, subject:, to_emails:)
3179
+ # @param id [String]
3180
+ #
3181
+ # @param created_at [Object] When the email was sent.
3182
+ #
3183
+ # @param from_address [String]
3184
+ #
3185
+ # @param resend_message_id [String, nil]
3186
+ #
3187
+ # @param subject [String]
3188
+ #
3189
+ # @param to_emails [Array<String>]
3190
+ end
3191
+
2747
3192
  # Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call',
2748
3193
  # 'voicemail', 'transfer', 'ivr_no_navigate'.
2749
3194
  #
@@ -2874,15 +3319,21 @@ module Revox
2874
3319
  # @return [String]
2875
3320
  required :message_body, String
2876
3321
 
2877
- # @!attribute to_phone_number
3322
+ # @!attribute provider
2878
3323
  #
2879
- # @return [String]
2880
- required :to_phone_number, String
3324
+ # @return [Symbol, Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::SMSLog::Provider]
3325
+ required :provider,
3326
+ enum: -> { Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::SMSLog::Provider }
2881
3327
 
2882
- # @!attribute twilio_message_sid
3328
+ # @!attribute provider_message_id
2883
3329
  #
2884
3330
  # @return [String, nil]
2885
- required :twilio_message_sid, String, nil?: true
3331
+ required :provider_message_id, String, nil?: true
3332
+
3333
+ # @!attribute to_phone_number
3334
+ #
3335
+ # @return [String]
3336
+ required :to_phone_number, String
2886
3337
 
2887
3338
  # @!attribute type
2888
3339
  #
@@ -2890,19 +3341,32 @@ module Revox
2890
3341
  required :type,
2891
3342
  enum: -> { Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::SMSLog::Type }
2892
3343
 
2893
- # @!method initialize(id:, created_at:, message_body:, to_phone_number:, twilio_message_sid:, type:)
3344
+ # @!method initialize(id:, created_at:, message_body:, provider:, provider_message_id:, to_phone_number:, type:)
2894
3345
  # @param id [String]
2895
3346
  #
2896
3347
  # @param created_at [Object] When the SMS was sent.
2897
3348
  #
2898
3349
  # @param message_body [String]
2899
3350
  #
2900
- # @param to_phone_number [String]
3351
+ # @param provider [Symbol, Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::SMSLog::Provider]
3352
+ #
3353
+ # @param provider_message_id [String, nil]
2901
3354
  #
2902
- # @param twilio_message_sid [String, nil]
3355
+ # @param to_phone_number [String]
2903
3356
  #
2904
3357
  # @param type [Symbol, Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::SMSLog::Type]
2905
3358
 
3359
+ # @see Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::SMSLog#provider
3360
+ module Provider
3361
+ extend Revox::Internal::Type::Enum
3362
+
3363
+ TWILIO = :twilio
3364
+ VONAGE = :vonage
3365
+
3366
+ # @!method self.values
3367
+ # @return [Array<Symbol>]
3368
+ end
3369
+
2906
3370
  # @see Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::SMSLog#type
2907
3371
  module Type
2908
3372
  extend Revox::Internal::Type::Enum
@@ -2916,6 +3380,126 @@ module Revox
2916
3380
  end
2917
3381
  end
2918
3382
 
3383
+ class SpeechEvent < Revox::Internal::Type::BaseModel
3384
+ # @!attribute id
3385
+ #
3386
+ # @return [String]
3387
+ required :id, String
3388
+
3389
+ # @!attribute is_real_turn
3390
+ # False when the segment was flagged as noise/blip rather than a meaningful turn.
3391
+ #
3392
+ # @return [Boolean]
3393
+ required :is_real_turn, Revox::Internal::Type::Boolean
3394
+
3395
+ # @!attribute llm_system_prompt
3396
+ # Agent-only: despite the name, the whole prompt the LLM was given for this turn —
3397
+ # system instructions plus conversation history — as JSON.
3398
+ #
3399
+ # @return [String, nil]
3400
+ required :llm_system_prompt, String, nil?: true
3401
+
3402
+ # @!attribute llm_ttft_ms
3403
+ # Agent-only: LLM time-to-first-token for the reply, in ms.
3404
+ #
3405
+ # @return [Float, nil]
3406
+ required :llm_ttft_ms, Float, nil?: true
3407
+
3408
+ # @!attribute llm_winner_model
3409
+ # Agent-only: the model that produced the reply — the winning leg when the LLM is
3410
+ # a race, which is also the model `llm_ttft_ms` describes.
3411
+ #
3412
+ # @return [String, nil]
3413
+ required :llm_winner_model, String, nil?: true
3414
+
3415
+ # @!attribute speaker
3416
+ # Who was speaking during this segment.
3417
+ #
3418
+ # @return [Symbol, Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::SpeechEvent::Speaker]
3419
+ required :speaker,
3420
+ enum: -> { Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::SpeechEvent::Speaker }
3421
+
3422
+ # @!attribute started_speaking_at_ms
3423
+ # Milliseconds since session start when speech began.
3424
+ #
3425
+ # @return [Float]
3426
+ required :started_speaking_at_ms, Float
3427
+
3428
+ # @!attribute stopped_speaking_at_ms
3429
+ # Milliseconds since session start when speech ended. Null when the session ended
3430
+ # before the turn closed.
3431
+ #
3432
+ # @return [Float, nil]
3433
+ required :stopped_speaking_at_ms, Float, nil?: true
3434
+
3435
+ # @!attribute stt_transcription_delay_ms
3436
+ # User-only: time from end-of-speech to final transcript, in ms.
3437
+ #
3438
+ # @return [Float, nil]
3439
+ required :stt_transcription_delay_ms, Float, nil?: true
3440
+
3441
+ # @!attribute transcript
3442
+ # Recognized text for this segment, when available.
3443
+ #
3444
+ # @return [String, nil]
3445
+ required :transcript, String, nil?: true
3446
+
3447
+ # @!attribute tts_ttfb_ms
3448
+ # Agent-only: TTS time-to-first-audio-byte for the reply, in ms.
3449
+ #
3450
+ # @return [Float, nil]
3451
+ required :tts_ttfb_ms, Float, nil?: true
3452
+
3453
+ # @!attribute was_cut
3454
+ # Agent-only: true when the agent's audio was interrupted (real or auto-resumed).
3455
+ # Null on user segments.
3456
+ #
3457
+ # @return [Boolean, nil]
3458
+ required :was_cut, Revox::Internal::Type::Boolean, nil?: true
3459
+
3460
+ # @!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:)
3461
+ # Some parameter documentations has been truncated, see
3462
+ # {Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::SpeechEvent}
3463
+ # for more details.
3464
+ #
3465
+ # @param id [String]
3466
+ #
3467
+ # @param is_real_turn [Boolean] False when the segment was flagged as noise/blip rather than a meaningful turn.
3468
+ #
3469
+ # @param llm_system_prompt [String, nil] Agent-only: despite the name, the whole prompt the LLM was given for this turn —
3470
+ #
3471
+ # @param llm_ttft_ms [Float, nil] Agent-only: LLM time-to-first-token for the reply, in ms.
3472
+ #
3473
+ # @param llm_winner_model [String, nil] Agent-only: the model that produced the reply — the winning leg when the LLM is
3474
+ #
3475
+ # @param speaker [Symbol, Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::SpeechEvent::Speaker] Who was speaking during this segment.
3476
+ #
3477
+ # @param started_speaking_at_ms [Float] Milliseconds since session start when speech began.
3478
+ #
3479
+ # @param stopped_speaking_at_ms [Float, nil] Milliseconds since session start when speech ended. Null when the session ended
3480
+ #
3481
+ # @param stt_transcription_delay_ms [Float, nil] User-only: time from end-of-speech to final transcript, in ms.
3482
+ #
3483
+ # @param transcript [String, nil] Recognized text for this segment, when available.
3484
+ #
3485
+ # @param tts_ttfb_ms [Float, nil] Agent-only: TTS time-to-first-audio-byte for the reply, in ms.
3486
+ #
3487
+ # @param was_cut [Boolean, nil] Agent-only: true when the agent's audio was interrupted (real or auto-resumed).
3488
+
3489
+ # Who was speaking during this segment.
3490
+ #
3491
+ # @see Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::SpeechEvent#speaker
3492
+ module Speaker
3493
+ extend Revox::Internal::Type::Enum
3494
+
3495
+ USER = :user
3496
+ AGENT = :agent
3497
+
3498
+ # @!method self.values
3499
+ # @return [Array<Symbol>]
3500
+ end
3501
+ end
3502
+
2919
3503
  class Transcript < Revox::Internal::Type::BaseModel
2920
3504
  # @!attribute content
2921
3505
  #
@@ -3152,6 +3736,7 @@ module Revox
3152
3736
  QUEUED_FOR_CALLING = :queued_for_calling
3153
3737
  CALLING = :calling
3154
3738
  POST_PROCESSING = :post_processing
3739
+ NOT_LAUNCHED = :not_launched
3155
3740
  SCHEDULED = :scheduled
3156
3741
  PAUSED = :paused
3157
3742
  COMPLETED = :completed
@@ -3172,9 +3757,6 @@ module Revox
3172
3757
  INTERESTED = :interested
3173
3758
  COMPLETED = :completed
3174
3759
  REQUESTED_CALLBACK_LATER = :requested_callback_later
3175
- REQUESTED_CALLBACK_NEW_NUMBER = :requested_callback_new_number
3176
- DO_NOT_CONTACT = :do_not_contact
3177
- AI_AVERSE = :ai_averse
3178
3760
 
3179
3761
  # @!method self.values
3180
3762
  # @return [Array<Symbol>]