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
@@ -243,6 +243,13 @@ module Revox
243
243
  sig { returns(T.nilable(String)) }
244
244
  attr_accessor :outcome_summary
245
245
 
246
+ # Slack channels resolved from the agent prompt's own routing rules, when it
247
+ # defines any. Always a subset of the channels configured on the assistant. Null
248
+ # when the prompt defines no routing rules, in which case every configured channel
249
+ # is notified.
250
+ sig { returns(T.nilable(T::Array[String])) }
251
+ attr_accessor :slack_channel_ids
252
+
246
253
  # This represent a call "order" that was requested by the user. A call order can
247
254
  # be resolved over multiple call attempts spanning up to a few days.
248
255
  sig do
@@ -300,7 +307,8 @@ module Revox
300
307
  T.nilable(
301
308
  Revox::Models::CallSearchResponse::Call::Outcome::OrSymbol
302
309
  ),
303
- outcome_summary: T.nilable(String)
310
+ outcome_summary: T.nilable(String),
311
+ slack_channel_ids: T.nilable(T::Array[String])
304
312
  ).returns(T.attached_class)
305
313
  end
306
314
  def self.new(
@@ -362,7 +370,12 @@ module Revox
362
370
  # Business outcome of the call. Null if not computed or no transcript.
363
371
  outcome: nil,
364
372
  # LLM explanation for the outcome, when outcome was computed from the transcript.
365
- outcome_summary: nil
373
+ outcome_summary: nil,
374
+ # Slack channels resolved from the agent prompt's own routing rules, when it
375
+ # defines any. Always a subset of the channels configured on the assistant. Null
376
+ # when the prompt defines no routing rules, in which case every configured channel
377
+ # is notified.
378
+ slack_channel_ids: nil
366
379
  )
367
380
  end
368
381
 
@@ -410,7 +423,8 @@ module Revox
410
423
  T.nilable(
411
424
  Revox::Models::CallSearchResponse::Call::Outcome::TaggedSymbol
412
425
  ),
413
- outcome_summary: T.nilable(String)
426
+ outcome_summary: T.nilable(String),
427
+ slack_channel_ids: T.nilable(T::Array[String])
414
428
  }
415
429
  )
416
430
  end
@@ -579,14 +593,6 @@ module Revox
579
593
  sig { returns(T.nilable(String)) }
580
594
  attr_accessor :email_notification_address
581
595
 
582
- # The language used for the notification email content. One of "en" or "fr".
583
- sig do
584
- returns(
585
- Revox::Models::CallSearchResponse::Call::Assistant::EmailNotificationLanguage::TaggedSymbol
586
- )
587
- end
588
- attr_accessor :email_notification_language
589
-
590
596
  # Which call outcomes trigger an email notification. E.g. ["interested",
591
597
  # "completed", "none"]. Use "none" when outcome is null.
592
598
  sig do
@@ -622,8 +628,8 @@ module Revox
622
628
  sig { returns(T.nilable(String)) }
623
629
  attr_accessor :from_phone_number
624
630
 
625
- # Warm or cold transfer when transfer_phone_number is set; null when transfer is
626
- # not configured.
631
+ # Warm or cold transfer when transfer_destinations is non-empty; null when
632
+ # transfer is not configured.
627
633
  sig do
628
634
  returns(
629
635
  T.nilable(
@@ -686,6 +692,11 @@ module Revox
686
692
  end
687
693
  attr_writer :position
688
694
 
695
+ # URL fetched before an inbound call is answered to resolve the assistant's prompt
696
+ # variables. Null when no lookup is configured.
697
+ sig { returns(T.nilable(String)) }
698
+ attr_accessor :precall_lookup_url
699
+
689
700
  sig { returns(String) }
690
701
  attr_accessor :prompt
691
702
 
@@ -807,9 +818,18 @@ module Revox
807
818
  sig { returns(Float) }
808
819
  attr_accessor :thinking_sound_volume
809
820
 
810
- # Phone number to transfer calls to when users request to speak to a human agent.
811
- sig { returns(T.nilable(String)) }
812
- attr_accessor :transfer_phone_number
821
+ # Where calls can be transferred to when users ask to speak to a human. Null or
822
+ # empty when transfer is not configured.
823
+ sig do
824
+ returns(
825
+ T.nilable(
826
+ T::Array[
827
+ Revox::Models::CallSearchResponse::Call::Assistant::TransferDestination
828
+ ]
829
+ )
830
+ )
831
+ end
832
+ attr_accessor :transfer_destinations
813
833
 
814
834
  sig do
815
835
  returns(
@@ -919,6 +939,12 @@ module Revox
919
939
  end
920
940
  attr_writer :faq_items
921
941
 
942
+ sig { returns(T.nilable(T::Boolean)) }
943
+ attr_reader :is_inbound_receptionist
944
+
945
+ sig { params(is_inbound_receptionist: T::Boolean).void }
946
+ attr_writer :is_inbound_receptionist
947
+
922
948
  sig { returns(T.nilable(T::Boolean)) }
923
949
  attr_reader :is_realestate_assistant
924
950
 
@@ -963,8 +989,6 @@ module Revox
963
989
  ]
964
990
  ),
965
991
  email_notification_address: T.nilable(String),
966
- email_notification_language:
967
- Revox::Models::CallSearchResponse::Call::Assistant::EmailNotificationLanguage::OrSymbol,
968
992
  email_notification_outcomes:
969
993
  T.nilable(
970
994
  T::Array[
@@ -998,6 +1022,7 @@ module Revox
998
1022
  T.nilable(
999
1023
  Revox::Models::CallSearchResponse::Call::Assistant::Position::OrHash
1000
1024
  ),
1025
+ precall_lookup_url: T.nilable(String),
1001
1026
  prompt: String,
1002
1027
  prompt_flow:
1003
1028
  T.nilable(
@@ -1028,7 +1053,12 @@ module Revox
1028
1053
  ),
1029
1054
  thinking_sound_probability: Float,
1030
1055
  thinking_sound_volume: Float,
1031
- transfer_phone_number: T.nilable(String),
1056
+ transfer_destinations:
1057
+ T.nilable(
1058
+ T::Array[
1059
+ Revox::Models::CallSearchResponse::Call::Assistant::TransferDestination::OrHash
1060
+ ]
1061
+ ),
1032
1062
  type:
1033
1063
  Revox::Models::CallSearchResponse::Call::Assistant::Type::OrSymbol,
1034
1064
  updated_at: T.anything,
@@ -1052,6 +1082,7 @@ module Revox
1052
1082
  T::Array[
1053
1083
  Revox::Models::CallSearchResponse::Call::Assistant::FaqItem::OrHash
1054
1084
  ],
1085
+ is_inbound_receptionist: T::Boolean,
1055
1086
  is_realestate_assistant: T::Boolean,
1056
1087
  pending_faq_count: Float
1057
1088
  ).returns(T.attached_class)
@@ -1080,8 +1111,6 @@ module Revox
1080
1111
  # outcome. Accepts a single email or a comma-separated list (e.g. "alice@x.com,
1081
1112
  # bob@y.com").
1082
1113
  email_notification_address:,
1083
- # The language used for the notification email content. One of "en" or "fr".
1084
- email_notification_language:,
1085
1114
  # Which call outcomes trigger an email notification. E.g. ["interested",
1086
1115
  # "completed", "none"]. Use "none" when outcome is null.
1087
1116
  email_notification_outcomes:,
@@ -1093,8 +1122,8 @@ module Revox
1093
1122
  # Override the default outbound phone number for calls placed with this assistant.
1094
1123
  # When null, the organization's default phone number is used.
1095
1124
  from_phone_number:,
1096
- # Warm or cold transfer when transfer_phone_number is set; null when transfer is
1097
- # not configured.
1125
+ # Warm or cold transfer when transfer_destinations is non-empty; null when
1126
+ # transfer is not configured.
1098
1127
  human_transfer_mode:,
1099
1128
  # Enable IVR navigation tools. When enabled, the assistant can send DTMF tones and
1100
1129
  # skip turns to navigate phone menus.
@@ -1113,6 +1142,9 @@ module Revox
1113
1142
  name:,
1114
1143
  organization_id:,
1115
1144
  position:,
1145
+ # URL fetched before an inbound call is answered to resolve the assistant's prompt
1146
+ # variables. Null when no lookup is configured.
1147
+ precall_lookup_url:,
1116
1148
  prompt:,
1117
1149
  prompt_flow:,
1118
1150
  slack:,
@@ -1144,8 +1176,9 @@ module Revox
1144
1176
  thinking_sound_probability:,
1145
1177
  # Volume of the thinking sound (0 = silent, 1 = max).
1146
1178
  thinking_sound_volume:,
1147
- # Phone number to transfer calls to when users request to speak to a human agent.
1148
- transfer_phone_number:,
1179
+ # Where calls can be transferred to when users ask to speak to a human. Null or
1180
+ # empty when transfer is not configured.
1181
+ transfer_destinations:,
1149
1182
  type:,
1150
1183
  updated_at:,
1151
1184
  voice:,
@@ -1164,6 +1197,7 @@ module Revox
1164
1197
  # The user who created the assistant.
1165
1198
  created_by: nil,
1166
1199
  faq_items: nil,
1200
+ is_inbound_receptionist: nil,
1167
1201
  is_realestate_assistant: nil,
1168
1202
  pending_faq_count: nil
1169
1203
  )
@@ -1202,8 +1236,6 @@ module Revox
1202
1236
  ]
1203
1237
  ),
1204
1238
  email_notification_address: T.nilable(String),
1205
- email_notification_language:
1206
- Revox::Models::CallSearchResponse::Call::Assistant::EmailNotificationLanguage::TaggedSymbol,
1207
1239
  email_notification_outcomes:
1208
1240
  T.nilable(
1209
1241
  T::Array[
@@ -1232,6 +1264,7 @@ module Revox
1232
1264
  T.nilable(
1233
1265
  Revox::Models::CallSearchResponse::Call::Assistant::Position
1234
1266
  ),
1267
+ precall_lookup_url: T.nilable(String),
1235
1268
  prompt: String,
1236
1269
  prompt_flow:
1237
1270
  T.nilable(
@@ -1262,7 +1295,12 @@ module Revox
1262
1295
  ),
1263
1296
  thinking_sound_probability: Float,
1264
1297
  thinking_sound_volume: Float,
1265
- transfer_phone_number: T.nilable(String),
1298
+ transfer_destinations:
1299
+ T.nilable(
1300
+ T::Array[
1301
+ Revox::Models::CallSearchResponse::Call::Assistant::TransferDestination
1302
+ ]
1303
+ ),
1266
1304
  type:
1267
1305
  Revox::Models::CallSearchResponse::Call::Assistant::Type::TaggedSymbol,
1268
1306
  updated_at: T.anything,
@@ -1286,6 +1324,7 @@ module Revox
1286
1324
  T::Array[
1287
1325
  Revox::Models::CallSearchResponse::Call::Assistant::FaqItem
1288
1326
  ],
1327
+ is_inbound_receptionist: T::Boolean,
1289
1328
  is_realestate_assistant: T::Boolean,
1290
1329
  pending_faq_count: Float
1291
1330
  }
@@ -1326,21 +1365,6 @@ module Revox
1326
1365
  :requested_callback_later,
1327
1366
  Revox::Models::CallSearchResponse::Call::Assistant::AfterCallSMSOutcome::TaggedSymbol
1328
1367
  )
1329
- REQUESTED_CALLBACK_NEW_NUMBER =
1330
- T.let(
1331
- :requested_callback_new_number,
1332
- Revox::Models::CallSearchResponse::Call::Assistant::AfterCallSMSOutcome::TaggedSymbol
1333
- )
1334
- DO_NOT_CONTACT =
1335
- T.let(
1336
- :do_not_contact,
1337
- Revox::Models::CallSearchResponse::Call::Assistant::AfterCallSMSOutcome::TaggedSymbol
1338
- )
1339
- AI_AVERSE =
1340
- T.let(
1341
- :ai_averse,
1342
- Revox::Models::CallSearchResponse::Call::Assistant::AfterCallSMSOutcome::TaggedSymbol
1343
- )
1344
1368
  NONE =
1345
1369
  T.let(
1346
1370
  :none,
@@ -1609,7 +1633,8 @@ module Revox
1609
1633
  sig { returns(String) }
1610
1634
  attr_accessor :calling_window_start_time
1611
1635
 
1612
- # Delay between retry attempts in seconds. Default: 7200 (2 hours).
1636
+ # Delay between retry attempts in seconds. 0 retries as soon as the calling window
1637
+ # allows. Default: 7200 (2 hours).
1613
1638
  sig { returns(Integer) }
1614
1639
  attr_accessor :retry_delay_seconds
1615
1640
 
@@ -1629,7 +1654,8 @@ module Revox
1629
1654
  # timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
1630
1655
  # Examples: '09:00', '10am'. Default: '10:00'.
1631
1656
  calling_window_start_time:,
1632
- # Delay between retry attempts in seconds. Default: 7200 (2 hours).
1657
+ # Delay between retry attempts in seconds. 0 retries as soon as the calling window
1658
+ # allows. Default: 7200 (2 hours).
1633
1659
  retry_delay_seconds:
1634
1660
  )
1635
1661
  end
@@ -2016,41 +2042,6 @@ module Revox
2016
2042
  end
2017
2043
  end
2018
2044
 
2019
- # The language used for the notification email content. One of "en" or "fr".
2020
- module EmailNotificationLanguage
2021
- extend Revox::Internal::Type::Enum
2022
-
2023
- TaggedSymbol =
2024
- T.type_alias do
2025
- T.all(
2026
- Symbol,
2027
- Revox::Models::CallSearchResponse::Call::Assistant::EmailNotificationLanguage
2028
- )
2029
- end
2030
- OrSymbol = T.type_alias { T.any(Symbol, String) }
2031
-
2032
- EN =
2033
- T.let(
2034
- :en,
2035
- Revox::Models::CallSearchResponse::Call::Assistant::EmailNotificationLanguage::TaggedSymbol
2036
- )
2037
- FR =
2038
- T.let(
2039
- :fr,
2040
- Revox::Models::CallSearchResponse::Call::Assistant::EmailNotificationLanguage::TaggedSymbol
2041
- )
2042
-
2043
- sig do
2044
- override.returns(
2045
- T::Array[
2046
- Revox::Models::CallSearchResponse::Call::Assistant::EmailNotificationLanguage::TaggedSymbol
2047
- ]
2048
- )
2049
- end
2050
- def self.values
2051
- end
2052
- end
2053
-
2054
2045
  module EmailNotificationOutcome
2055
2046
  extend Revox::Internal::Type::Enum
2056
2047
 
@@ -2083,21 +2074,6 @@ module Revox
2083
2074
  :requested_callback_later,
2084
2075
  Revox::Models::CallSearchResponse::Call::Assistant::EmailNotificationOutcome::TaggedSymbol
2085
2076
  )
2086
- REQUESTED_CALLBACK_NEW_NUMBER =
2087
- T.let(
2088
- :requested_callback_new_number,
2089
- Revox::Models::CallSearchResponse::Call::Assistant::EmailNotificationOutcome::TaggedSymbol
2090
- )
2091
- DO_NOT_CONTACT =
2092
- T.let(
2093
- :do_not_contact,
2094
- Revox::Models::CallSearchResponse::Call::Assistant::EmailNotificationOutcome::TaggedSymbol
2095
- )
2096
- AI_AVERSE =
2097
- T.let(
2098
- :ai_averse,
2099
- Revox::Models::CallSearchResponse::Call::Assistant::EmailNotificationOutcome::TaggedSymbol
2100
- )
2101
2077
  NONE =
2102
2078
  T.let(
2103
2079
  :none,
@@ -2154,8 +2130,8 @@ module Revox
2154
2130
  end
2155
2131
  end
2156
2132
 
2157
- # Warm or cold transfer when transfer_phone_number is set; null when transfer is
2158
- # not configured.
2133
+ # Warm or cold transfer when transfer_destinations is non-empty; null when
2134
+ # transfer is not configured.
2159
2135
  module HumanTransferMode
2160
2136
  extend Revox::Internal::Type::Enum
2161
2137
 
@@ -2753,9 +2729,17 @@ module Revox
2753
2729
  )
2754
2730
  end
2755
2731
 
2756
- # The Slack channel ID where the notification will be posted.
2757
- sig { returns(String) }
2758
- attr_accessor :channel_id
2732
+ # The Slack channels eligible to receive the notification. When more than one is
2733
+ # configured, the agent prompt may define routing rules to narrow it down per
2734
+ # call; with no such rules every channel here is notified.
2735
+ sig do
2736
+ returns(
2737
+ T::Array[
2738
+ Revox::Models::CallSearchResponse::Call::Assistant::Slack::Channel
2739
+ ]
2740
+ )
2741
+ end
2742
+ attr_accessor :channels
2759
2743
 
2760
2744
  # The Nango connection ID linking the org's Slack workspace to Revox.
2761
2745
  sig { returns(String) }
@@ -2772,45 +2756,43 @@ module Revox
2772
2756
  end
2773
2757
  attr_accessor :outcomes
2774
2758
 
2775
- # Human-readable Slack channel name, cached for display in the UI.
2776
- sig { returns(T.nilable(String)) }
2777
- attr_accessor :channel_name
2778
-
2779
2759
  # Optional message template. Supports {{summary}}, {{outcome}}, {{phone}},
2780
2760
  # {{call_url}}, {{assistant_name}}, {{campaign_name}}, {{first_name}},
2781
- # {{last_name}}, {{email}}, {{company}}, {{contact_name}}, {{contact_line}}, plus
2782
- # prompt_variables and structured_output keys. When null/empty a default template
2783
- # is used.
2761
+ # {{last_name}}, {{email}}, {{company}}, {{job_title}}, {{contact_name}},
2762
+ # {{contact_line}}, plus prompt_variables and structured_output keys. When
2763
+ # null/empty a default template is used.
2784
2764
  sig { returns(T.nilable(String)) }
2785
2765
  attr_accessor :template
2786
2766
 
2787
2767
  sig do
2788
2768
  params(
2789
- channel_id: String,
2769
+ channels:
2770
+ T::Array[
2771
+ Revox::Models::CallSearchResponse::Call::Assistant::Slack::Channel::OrHash
2772
+ ],
2790
2773
  connection_id: String,
2791
2774
  outcomes:
2792
2775
  T::Array[
2793
2776
  Revox::Models::CallSearchResponse::Call::Assistant::Slack::Outcome::OrSymbol
2794
2777
  ],
2795
- channel_name: T.nilable(String),
2796
2778
  template: T.nilable(String)
2797
2779
  ).returns(T.attached_class)
2798
2780
  end
2799
2781
  def self.new(
2800
- # The Slack channel ID where the notification will be posted.
2801
- channel_id:,
2782
+ # The Slack channels eligible to receive the notification. When more than one is
2783
+ # configured, the agent prompt may define routing rules to narrow it down per
2784
+ # call; with no such rules every channel here is notified.
2785
+ channels:,
2802
2786
  # The Nango connection ID linking the org's Slack workspace to Revox.
2803
2787
  connection_id:,
2804
2788
  # Which call outcomes trigger a Slack notification (e.g. ['interested', 'none']).
2805
2789
  # Use 'none' to notify when outcome is null.
2806
2790
  outcomes:,
2807
- # Human-readable Slack channel name, cached for display in the UI.
2808
- channel_name: nil,
2809
2791
  # Optional message template. Supports {{summary}}, {{outcome}}, {{phone}},
2810
2792
  # {{call_url}}, {{assistant_name}}, {{campaign_name}}, {{first_name}},
2811
- # {{last_name}}, {{email}}, {{company}}, {{contact_name}}, {{contact_line}}, plus
2812
- # prompt_variables and structured_output keys. When null/empty a default template
2813
- # is used.
2793
+ # {{last_name}}, {{email}}, {{company}}, {{job_title}}, {{contact_name}},
2794
+ # {{contact_line}}, plus prompt_variables and structured_output keys. When
2795
+ # null/empty a default template is used.
2814
2796
  template: nil
2815
2797
  )
2816
2798
  end
@@ -2818,13 +2800,15 @@ module Revox
2818
2800
  sig do
2819
2801
  override.returns(
2820
2802
  {
2821
- channel_id: String,
2803
+ channels:
2804
+ T::Array[
2805
+ Revox::Models::CallSearchResponse::Call::Assistant::Slack::Channel
2806
+ ],
2822
2807
  connection_id: String,
2823
2808
  outcomes:
2824
2809
  T::Array[
2825
2810
  Revox::Models::CallSearchResponse::Call::Assistant::Slack::Outcome::TaggedSymbol
2826
2811
  ],
2827
- channel_name: T.nilable(String),
2828
2812
  template: T.nilable(String)
2829
2813
  }
2830
2814
  )
@@ -2832,6 +2816,43 @@ module Revox
2832
2816
  def to_hash
2833
2817
  end
2834
2818
 
2819
+ class Channel < Revox::Internal::Type::BaseModel
2820
+ OrHash =
2821
+ T.type_alias do
2822
+ T.any(
2823
+ Revox::Models::CallSearchResponse::Call::Assistant::Slack::Channel,
2824
+ Revox::Internal::AnyHash
2825
+ )
2826
+ end
2827
+
2828
+ # The Slack channel ID (e.g. 'C01234567').
2829
+ sig { returns(String) }
2830
+ attr_accessor :id
2831
+
2832
+ # Human-readable Slack channel name, cached for display in the UI and given to the
2833
+ # LLM when the agent prompt routes by channel name.
2834
+ sig { returns(T.nilable(String)) }
2835
+ attr_accessor :name
2836
+
2837
+ sig do
2838
+ params(id: String, name: T.nilable(String)).returns(
2839
+ T.attached_class
2840
+ )
2841
+ end
2842
+ def self.new(
2843
+ # The Slack channel ID (e.g. 'C01234567').
2844
+ id:,
2845
+ # Human-readable Slack channel name, cached for display in the UI and given to the
2846
+ # LLM when the agent prompt routes by channel name.
2847
+ name: nil
2848
+ )
2849
+ end
2850
+
2851
+ sig { override.returns({ id: String, name: T.nilable(String) }) }
2852
+ def to_hash
2853
+ end
2854
+ end
2855
+
2835
2856
  module Outcome
2836
2857
  extend Revox::Internal::Type::Enum
2837
2858
 
@@ -2864,21 +2885,6 @@ module Revox
2864
2885
  :requested_callback_later,
2865
2886
  Revox::Models::CallSearchResponse::Call::Assistant::Slack::Outcome::TaggedSymbol
2866
2887
  )
2867
- REQUESTED_CALLBACK_NEW_NUMBER =
2868
- T.let(
2869
- :requested_callback_new_number,
2870
- Revox::Models::CallSearchResponse::Call::Assistant::Slack::Outcome::TaggedSymbol
2871
- )
2872
- DO_NOT_CONTACT =
2873
- T.let(
2874
- :do_not_contact,
2875
- Revox::Models::CallSearchResponse::Call::Assistant::Slack::Outcome::TaggedSymbol
2876
- )
2877
- AI_AVERSE =
2878
- T.let(
2879
- :ai_averse,
2880
- Revox::Models::CallSearchResponse::Call::Assistant::Slack::Outcome::TaggedSymbol
2881
- )
2882
2888
  NONE =
2883
2889
  T.let(
2884
2890
  :none,
@@ -3193,6 +3199,34 @@ module Revox
3193
3199
  end
3194
3200
  end
3195
3201
 
3202
+ class TransferDestination < Revox::Internal::Type::BaseModel
3203
+ OrHash =
3204
+ T.type_alias do
3205
+ T.any(
3206
+ Revox::Models::CallSearchResponse::Call::Assistant::TransferDestination,
3207
+ Revox::Internal::AnyHash
3208
+ )
3209
+ end
3210
+
3211
+ sig { returns(String) }
3212
+ attr_accessor :label
3213
+
3214
+ sig { returns(String) }
3215
+ attr_accessor :phone_number
3216
+
3217
+ sig do
3218
+ params(label: String, phone_number: String).returns(
3219
+ T.attached_class
3220
+ )
3221
+ end
3222
+ def self.new(label:, phone_number:)
3223
+ end
3224
+
3225
+ sig { override.returns({ label: String, phone_number: String }) }
3226
+ def to_hash
3227
+ end
3228
+ end
3229
+
3196
3230
  module Type
3197
3231
  extend Revox::Internal::Type::Enum
3198
3232
 
@@ -3273,7 +3307,7 @@ module Revox
3273
3307
  attr_writer :model
3274
3308
 
3275
3309
  # The speed of the voice. Range depends on provider: Cartesia 0.6–1.5, ElevenLabs
3276
- # 0.7–1.2. Default is 1.0.
3310
+ # 0.7–1.2, Gradium 0.6–1.5. Default is 1.0.
3277
3311
  sig { returns(T.nilable(Float)) }
3278
3312
  attr_reader :speed
3279
3313
 
@@ -3308,7 +3342,7 @@ module Revox
3308
3342
  # for other providers.
3309
3343
  model: nil,
3310
3344
  # The speed of the voice. Range depends on provider: Cartesia 0.6–1.5, ElevenLabs
3311
- # 0.7–1.2. Default is 1.0.
3345
+ # 0.7–1.2, Gradium 0.6–1.5. Default is 1.0.
3312
3346
  speed: nil,
3313
3347
  # Volume of the voice (Cartesia only). 0.5–2.0, default 1.0. Ignored for other
3314
3348
  # providers.
@@ -3355,6 +3389,11 @@ module Revox
3355
3389
  :elevenlabs,
3356
3390
  Revox::Models::CallSearchResponse::Call::Assistant::Voice::Provider::TaggedSymbol
3357
3391
  )
3392
+ GRADIUM =
3393
+ T.let(
3394
+ :gradium,
3395
+ Revox::Models::CallSearchResponse::Call::Assistant::Voice::Provider::TaggedSymbol
3396
+ )
3358
3397
 
3359
3398
  sig do
3360
3399
  override.returns(
@@ -3585,21 +3624,6 @@ module Revox
3585
3624
  :requested_callback_later,
3586
3625
  Revox::Models::CallSearchResponse::Call::Assistant::Zoho::Outcome::TaggedSymbol
3587
3626
  )
3588
- REQUESTED_CALLBACK_NEW_NUMBER =
3589
- T.let(
3590
- :requested_callback_new_number,
3591
- Revox::Models::CallSearchResponse::Call::Assistant::Zoho::Outcome::TaggedSymbol
3592
- )
3593
- DO_NOT_CONTACT =
3594
- T.let(
3595
- :do_not_contact,
3596
- Revox::Models::CallSearchResponse::Call::Assistant::Zoho::Outcome::TaggedSymbol
3597
- )
3598
- AI_AVERSE =
3599
- T.let(
3600
- :ai_averse,
3601
- Revox::Models::CallSearchResponse::Call::Assistant::Zoho::Outcome::TaggedSymbol
3602
- )
3603
3627
  NONE =
3604
3628
  T.let(
3605
3629
  :none,
@@ -3817,6 +3841,37 @@ module Revox
3817
3841
  sig { returns(T.anything) }
3818
3842
  attr_accessor :ended_at
3819
3843
 
3844
+ # Whether the AI agent conducted the conversation on this attempt. False for a
3845
+ # silent speed-dial probe (whose agent only detects a human) and for attempts that
3846
+ # were never answered.
3847
+ sig { returns(T::Boolean) }
3848
+ attr_accessor :handled_by_ai
3849
+
3850
+ # Whether a human operator conducted (part of) this attempt — a jump-in takeover
3851
+ # or a speed-dial operator connection (both stamp human_takeover_at).
3852
+ sig { returns(T::Boolean) }
3853
+ attr_accessor :handled_by_human
3854
+
3855
+ # The team member responsible for following up on this call.
3856
+ sig do
3857
+ returns(
3858
+ T.nilable(
3859
+ Revox::Models::CallSearchResponse::Call::CallAttempt::HandledByUser
3860
+ )
3861
+ )
3862
+ end
3863
+ attr_reader :handled_by_user
3864
+
3865
+ sig do
3866
+ params(
3867
+ handled_by_user:
3868
+ T.nilable(
3869
+ Revox::Models::CallSearchResponse::Call::CallAttempt::HandledByUser::OrHash
3870
+ )
3871
+ ).void
3872
+ end
3873
+ attr_writer :handled_by_user
3874
+
3820
3875
  # The phone number that was called. Formatted in E.164 format. Example:
3821
3876
  # +1234567890
3822
3877
  sig { returns(String) }
@@ -3851,6 +3906,19 @@ module Revox
3851
3906
  sig { returns(T.nilable(T::Array[String])) }
3852
3907
  attr_accessor :assistants_used
3853
3908
 
3909
+ # Notification emails sent in connection with the call, ordered oldest first
3910
+ # (from/to addresses, subject, sent time).
3911
+ sig do
3912
+ returns(
3913
+ T.nilable(
3914
+ T::Array[
3915
+ Revox::Models::CallSearchResponse::Call::CallAttempt::EmailLog
3916
+ ]
3917
+ )
3918
+ )
3919
+ end
3920
+ attr_accessor :email_log
3921
+
3854
3922
  # Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call',
3855
3923
  # 'voicemail', 'transfer', 'ivr_no_navigate'.
3856
3924
  sig do
@@ -3900,6 +3968,20 @@ module Revox
3900
3968
  end
3901
3969
  attr_accessor :sms_log
3902
3970
 
3971
+ # Per-turn speech segments (VAD-derived) with timing and pipeline latencies,
3972
+ # ordered by started_speaking_at_ms. Empty for calls recorded before this was
3973
+ # tracked or for realtime sessions that don't emit them.
3974
+ sig do
3975
+ returns(
3976
+ T.nilable(
3977
+ T::Array[
3978
+ Revox::Models::CallSearchResponse::Call::CallAttempt::SpeechEvent
3979
+ ]
3980
+ )
3981
+ )
3982
+ end
3983
+ attr_accessor :speech_events
3984
+
3903
3985
  # The data extracted from the call, using the structured output config from the
3904
3986
  # parent call object.
3905
3987
  sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
@@ -3928,6 +4010,12 @@ module Revox
3928
4010
  Revox::Models::CallSearchResponse::Call::CallAttempt::DialError::OrSymbol
3929
4011
  ),
3930
4012
  ended_at: T.anything,
4013
+ handled_by_ai: T::Boolean,
4014
+ handled_by_human: T::Boolean,
4015
+ handled_by_user:
4016
+ T.nilable(
4017
+ Revox::Models::CallSearchResponse::Call::CallAttempt::HandledByUser::OrHash
4018
+ ),
3931
4019
  phone_number: String,
3932
4020
  recording_url: T.nilable(String),
3933
4021
  result:
@@ -3938,6 +4026,12 @@ module Revox
3938
4026
  status:
3939
4027
  Revox::Models::CallSearchResponse::Call::CallAttempt::Status::OrSymbol,
3940
4028
  assistants_used: T.nilable(T::Array[String]),
4029
+ email_log:
4030
+ T.nilable(
4031
+ T::Array[
4032
+ Revox::Models::CallSearchResponse::Call::CallAttempt::EmailLog::OrHash
4033
+ ]
4034
+ ),
3941
4035
  end_reason:
3942
4036
  T.nilable(
3943
4037
  Revox::Models::CallSearchResponse::Call::CallAttempt::EndReason::OrSymbol
@@ -3958,6 +4052,12 @@ module Revox
3958
4052
  Revox::Models::CallSearchResponse::Call::CallAttempt::SMSLog::OrHash
3959
4053
  ]
3960
4054
  ),
4055
+ speech_events:
4056
+ T.nilable(
4057
+ T::Array[
4058
+ Revox::Models::CallSearchResponse::Call::CallAttempt::SpeechEvent::OrHash
4059
+ ]
4060
+ ),
3961
4061
  structured_output: T.nilable(T::Hash[Symbol, T.anything]),
3962
4062
  transcript:
3963
4063
  T.nilable(
@@ -3976,6 +4076,15 @@ module Revox
3976
4076
  dial_error:,
3977
4077
  # The time the call ended.
3978
4078
  ended_at:,
4079
+ # Whether the AI agent conducted the conversation on this attempt. False for a
4080
+ # silent speed-dial probe (whose agent only detects a human) and for attempts that
4081
+ # were never answered.
4082
+ handled_by_ai:,
4083
+ # Whether a human operator conducted (part of) this attempt — a jump-in takeover
4084
+ # or a speed-dial operator connection (both stamp human_takeover_at).
4085
+ handled_by_human:,
4086
+ # The team member responsible for following up on this call.
4087
+ handled_by_user:,
3979
4088
  # The phone number that was called. Formatted in E.164 format. Example:
3980
4089
  # +1234567890
3981
4090
  phone_number:,
@@ -3988,6 +4097,9 @@ module Revox
3988
4097
  status:,
3989
4098
  # Assistant node ids entered during this attempt, in traversal order.
3990
4099
  assistants_used: nil,
4100
+ # Notification emails sent in connection with the call, ordered oldest first
4101
+ # (from/to addresses, subject, sent time).
4102
+ email_log: nil,
3991
4103
  # Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call',
3992
4104
  # 'voicemail', 'transfer', 'ivr_no_navigate'.
3993
4105
  end_reason: nil,
@@ -4001,6 +4113,10 @@ module Revox
4001
4113
  # first. The in-call `send_sms` is excluded — it already appears in the transcript
4002
4114
  # as a tool call.
4003
4115
  sms_log: nil,
4116
+ # Per-turn speech segments (VAD-derived) with timing and pipeline latencies,
4117
+ # ordered by started_speaking_at_ms. Empty for calls recorded before this was
4118
+ # tracked or for realtime sessions that don't emit them.
4119
+ speech_events: nil,
4004
4120
  # The data extracted from the call, using the structured output config from the
4005
4121
  # parent call object.
4006
4122
  structured_output: nil,
@@ -4019,6 +4135,12 @@ module Revox
4019
4135
  Revox::Models::CallSearchResponse::Call::CallAttempt::DialError::TaggedSymbol
4020
4136
  ),
4021
4137
  ended_at: T.anything,
4138
+ handled_by_ai: T::Boolean,
4139
+ handled_by_human: T::Boolean,
4140
+ handled_by_user:
4141
+ T.nilable(
4142
+ Revox::Models::CallSearchResponse::Call::CallAttempt::HandledByUser
4143
+ ),
4022
4144
  phone_number: String,
4023
4145
  recording_url: T.nilable(String),
4024
4146
  result:
@@ -4029,6 +4151,12 @@ module Revox
4029
4151
  status:
4030
4152
  Revox::Models::CallSearchResponse::Call::CallAttempt::Status::TaggedSymbol,
4031
4153
  assistants_used: T.nilable(T::Array[String]),
4154
+ email_log:
4155
+ T.nilable(
4156
+ T::Array[
4157
+ Revox::Models::CallSearchResponse::Call::CallAttempt::EmailLog
4158
+ ]
4159
+ ),
4032
4160
  end_reason:
4033
4161
  T.nilable(
4034
4162
  Revox::Models::CallSearchResponse::Call::CallAttempt::EndReason::TaggedSymbol
@@ -4049,6 +4177,12 @@ module Revox
4049
4177
  Revox::Models::CallSearchResponse::Call::CallAttempt::SMSLog
4050
4178
  ]
4051
4179
  ),
4180
+ speech_events:
4181
+ T.nilable(
4182
+ T::Array[
4183
+ Revox::Models::CallSearchResponse::Call::CallAttempt::SpeechEvent
4184
+ ]
4185
+ ),
4052
4186
  structured_output: T.nilable(T::Hash[Symbol, T.anything]),
4053
4187
  transcript:
4054
4188
  T.nilable(
@@ -4127,52 +4261,106 @@ module Revox
4127
4261
  end
4128
4262
  end
4129
4263
 
4130
- module Result
4131
- extend Revox::Internal::Type::Enum
4132
-
4133
- TaggedSymbol =
4264
+ class HandledByUser < Revox::Internal::Type::BaseModel
4265
+ OrHash =
4134
4266
  T.type_alias do
4135
- T.all(
4136
- Symbol,
4137
- Revox::Models::CallSearchResponse::Call::CallAttempt::Result
4267
+ T.any(
4268
+ Revox::Models::CallSearchResponse::Call::CallAttempt::HandledByUser,
4269
+ Revox::Internal::AnyHash
4138
4270
  )
4139
4271
  end
4140
- OrSymbol = T.type_alias { T.any(Symbol, String) }
4141
4272
 
4142
- IVR =
4143
- T.let(
4144
- :IVR,
4145
- Revox::Models::CallSearchResponse::Call::CallAttempt::Result::TaggedSymbol
4146
- )
4147
- VOICEMAIL =
4148
- T.let(
4149
- :voicemail,
4150
- Revox::Models::CallSearchResponse::Call::CallAttempt::Result::TaggedSymbol
4151
- )
4152
- HUMAN =
4153
- T.let(
4154
- :human,
4155
- Revox::Models::CallSearchResponse::Call::CallAttempt::Result::TaggedSymbol
4156
- )
4157
- UNKNOWN =
4158
- T.let(
4159
- :unknown,
4160
- Revox::Models::CallSearchResponse::Call::CallAttempt::Result::TaggedSymbol
4161
- )
4162
- IOS_SCREENING_FILTER =
4163
- T.let(
4164
- :"ios-screening-filter",
4165
- Revox::Models::CallSearchResponse::Call::CallAttempt::Result::TaggedSymbol
4166
- )
4273
+ # The database user id of the assignee.
4274
+ sig { returns(String) }
4275
+ attr_accessor :id
4167
4276
 
4168
- sig do
4169
- override.returns(
4170
- T::Array[
4171
- Revox::Models::CallSearchResponse::Call::CallAttempt::Result::TaggedSymbol
4172
- ]
4173
- )
4174
- end
4175
- def self.values
4277
+ sig { returns(String) }
4278
+ attr_accessor :email
4279
+
4280
+ sig { returns(T.nilable(String)) }
4281
+ attr_accessor :first_name
4282
+
4283
+ sig { returns(T.nilable(String)) }
4284
+ attr_accessor :last_name
4285
+
4286
+ # The team member responsible for following up on this call.
4287
+ sig do
4288
+ params(
4289
+ id: String,
4290
+ email: String,
4291
+ first_name: T.nilable(String),
4292
+ last_name: T.nilable(String)
4293
+ ).returns(T.attached_class)
4294
+ end
4295
+ def self.new(
4296
+ # The database user id of the assignee.
4297
+ id:,
4298
+ email:,
4299
+ first_name:,
4300
+ last_name:
4301
+ )
4302
+ end
4303
+
4304
+ sig do
4305
+ override.returns(
4306
+ {
4307
+ id: String,
4308
+ email: String,
4309
+ first_name: T.nilable(String),
4310
+ last_name: T.nilable(String)
4311
+ }
4312
+ )
4313
+ end
4314
+ def to_hash
4315
+ end
4316
+ end
4317
+
4318
+ module Result
4319
+ extend Revox::Internal::Type::Enum
4320
+
4321
+ TaggedSymbol =
4322
+ T.type_alias do
4323
+ T.all(
4324
+ Symbol,
4325
+ Revox::Models::CallSearchResponse::Call::CallAttempt::Result
4326
+ )
4327
+ end
4328
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
4329
+
4330
+ IVR =
4331
+ T.let(
4332
+ :IVR,
4333
+ Revox::Models::CallSearchResponse::Call::CallAttempt::Result::TaggedSymbol
4334
+ )
4335
+ VOICEMAIL =
4336
+ T.let(
4337
+ :voicemail,
4338
+ Revox::Models::CallSearchResponse::Call::CallAttempt::Result::TaggedSymbol
4339
+ )
4340
+ HUMAN =
4341
+ T.let(
4342
+ :human,
4343
+ Revox::Models::CallSearchResponse::Call::CallAttempt::Result::TaggedSymbol
4344
+ )
4345
+ UNKNOWN =
4346
+ T.let(
4347
+ :unknown,
4348
+ Revox::Models::CallSearchResponse::Call::CallAttempt::Result::TaggedSymbol
4349
+ )
4350
+ IOS_SCREENING_FILTER =
4351
+ T.let(
4352
+ :"ios-screening-filter",
4353
+ Revox::Models::CallSearchResponse::Call::CallAttempt::Result::TaggedSymbol
4354
+ )
4355
+
4356
+ sig do
4357
+ override.returns(
4358
+ T::Array[
4359
+ Revox::Models::CallSearchResponse::Call::CallAttempt::Result::TaggedSymbol
4360
+ ]
4361
+ )
4362
+ end
4363
+ def self.values
4176
4364
  end
4177
4365
  end
4178
4366
 
@@ -4226,6 +4414,71 @@ module Revox
4226
4414
  end
4227
4415
  end
4228
4416
 
4417
+ class EmailLog < Revox::Internal::Type::BaseModel
4418
+ OrHash =
4419
+ T.type_alias do
4420
+ T.any(
4421
+ Revox::Models::CallSearchResponse::Call::CallAttempt::EmailLog,
4422
+ Revox::Internal::AnyHash
4423
+ )
4424
+ end
4425
+
4426
+ sig { returns(String) }
4427
+ attr_accessor :id
4428
+
4429
+ # When the email was sent.
4430
+ sig { returns(T.anything) }
4431
+ attr_accessor :created_at
4432
+
4433
+ sig { returns(String) }
4434
+ attr_accessor :from_address
4435
+
4436
+ sig { returns(T.nilable(String)) }
4437
+ attr_accessor :resend_message_id
4438
+
4439
+ sig { returns(String) }
4440
+ attr_accessor :subject
4441
+
4442
+ sig { returns(T::Array[String]) }
4443
+ attr_accessor :to_emails
4444
+
4445
+ sig do
4446
+ params(
4447
+ id: String,
4448
+ created_at: T.anything,
4449
+ from_address: String,
4450
+ resend_message_id: T.nilable(String),
4451
+ subject: String,
4452
+ to_emails: T::Array[String]
4453
+ ).returns(T.attached_class)
4454
+ end
4455
+ def self.new(
4456
+ id:,
4457
+ # When the email was sent.
4458
+ created_at:,
4459
+ from_address:,
4460
+ resend_message_id:,
4461
+ subject:,
4462
+ to_emails:
4463
+ )
4464
+ end
4465
+
4466
+ sig do
4467
+ override.returns(
4468
+ {
4469
+ id: String,
4470
+ created_at: T.anything,
4471
+ from_address: String,
4472
+ resend_message_id: T.nilable(String),
4473
+ subject: String,
4474
+ to_emails: T::Array[String]
4475
+ }
4476
+ )
4477
+ end
4478
+ def to_hash
4479
+ end
4480
+ end
4481
+
4229
4482
  # Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call',
4230
4483
  # 'voicemail', 'transfer', 'ivr_no_navigate'.
4231
4484
  module EndReason
@@ -4553,11 +4806,18 @@ module Revox
4553
4806
  sig { returns(String) }
4554
4807
  attr_accessor :message_body
4555
4808
 
4556
- sig { returns(String) }
4557
- attr_accessor :to_phone_number
4809
+ sig do
4810
+ returns(
4811
+ Revox::Models::CallSearchResponse::Call::CallAttempt::SMSLog::Provider::TaggedSymbol
4812
+ )
4813
+ end
4814
+ attr_accessor :provider
4558
4815
 
4559
4816
  sig { returns(T.nilable(String)) }
4560
- attr_accessor :twilio_message_sid
4817
+ attr_accessor :provider_message_id
4818
+
4819
+ sig { returns(String) }
4820
+ attr_accessor :to_phone_number
4561
4821
 
4562
4822
  sig do
4563
4823
  returns(
@@ -4571,8 +4831,10 @@ module Revox
4571
4831
  id: String,
4572
4832
  created_at: T.anything,
4573
4833
  message_body: String,
4834
+ provider:
4835
+ Revox::Models::CallSearchResponse::Call::CallAttempt::SMSLog::Provider::OrSymbol,
4836
+ provider_message_id: T.nilable(String),
4574
4837
  to_phone_number: String,
4575
- twilio_message_sid: T.nilable(String),
4576
4838
  type:
4577
4839
  Revox::Models::CallSearchResponse::Call::CallAttempt::SMSLog::Type::OrSymbol
4578
4840
  ).returns(T.attached_class)
@@ -4582,8 +4844,9 @@ module Revox
4582
4844
  # When the SMS was sent.
4583
4845
  created_at:,
4584
4846
  message_body:,
4847
+ provider:,
4848
+ provider_message_id:,
4585
4849
  to_phone_number:,
4586
- twilio_message_sid:,
4587
4850
  type:
4588
4851
  )
4589
4852
  end
@@ -4594,8 +4857,10 @@ module Revox
4594
4857
  id: String,
4595
4858
  created_at: T.anything,
4596
4859
  message_body: String,
4860
+ provider:
4861
+ Revox::Models::CallSearchResponse::Call::CallAttempt::SMSLog::Provider::TaggedSymbol,
4862
+ provider_message_id: T.nilable(String),
4597
4863
  to_phone_number: String,
4598
- twilio_message_sid: T.nilable(String),
4599
4864
  type:
4600
4865
  Revox::Models::CallSearchResponse::Call::CallAttempt::SMSLog::Type::TaggedSymbol
4601
4866
  }
@@ -4604,6 +4869,40 @@ module Revox
4604
4869
  def to_hash
4605
4870
  end
4606
4871
 
4872
+ module Provider
4873
+ extend Revox::Internal::Type::Enum
4874
+
4875
+ TaggedSymbol =
4876
+ T.type_alias do
4877
+ T.all(
4878
+ Symbol,
4879
+ Revox::Models::CallSearchResponse::Call::CallAttempt::SMSLog::Provider
4880
+ )
4881
+ end
4882
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
4883
+
4884
+ TWILIO =
4885
+ T.let(
4886
+ :twilio,
4887
+ Revox::Models::CallSearchResponse::Call::CallAttempt::SMSLog::Provider::TaggedSymbol
4888
+ )
4889
+ VONAGE =
4890
+ T.let(
4891
+ :vonage,
4892
+ Revox::Models::CallSearchResponse::Call::CallAttempt::SMSLog::Provider::TaggedSymbol
4893
+ )
4894
+
4895
+ sig do
4896
+ override.returns(
4897
+ T::Array[
4898
+ Revox::Models::CallSearchResponse::Call::CallAttempt::SMSLog::Provider::TaggedSymbol
4899
+ ]
4900
+ )
4901
+ end
4902
+ def self.values
4903
+ end
4904
+ end
4905
+
4607
4906
  module Type
4608
4907
  extend Revox::Internal::Type::Enum
4609
4908
 
@@ -4644,6 +4943,176 @@ module Revox
4644
4943
  end
4645
4944
  end
4646
4945
 
4946
+ class SpeechEvent < Revox::Internal::Type::BaseModel
4947
+ OrHash =
4948
+ T.type_alias do
4949
+ T.any(
4950
+ Revox::Models::CallSearchResponse::Call::CallAttempt::SpeechEvent,
4951
+ Revox::Internal::AnyHash
4952
+ )
4953
+ end
4954
+
4955
+ sig { returns(String) }
4956
+ attr_accessor :id
4957
+
4958
+ # False when the segment was flagged as noise/blip rather than a meaningful turn.
4959
+ sig { returns(T::Boolean) }
4960
+ attr_accessor :is_real_turn
4961
+
4962
+ # Agent-only: despite the name, the whole prompt the LLM was given for this turn —
4963
+ # system instructions plus conversation history — as JSON.
4964
+ sig { returns(T.nilable(String)) }
4965
+ attr_accessor :llm_system_prompt
4966
+
4967
+ # Agent-only: LLM time-to-first-token for the reply, in ms.
4968
+ sig { returns(T.nilable(Float)) }
4969
+ attr_accessor :llm_ttft_ms
4970
+
4971
+ # Agent-only: the model that produced the reply — the winning leg when the LLM is
4972
+ # a race, which is also the model `llm_ttft_ms` describes.
4973
+ sig { returns(T.nilable(String)) }
4974
+ attr_accessor :llm_winner_model
4975
+
4976
+ # Who was speaking during this segment.
4977
+ sig do
4978
+ returns(
4979
+ Revox::Models::CallSearchResponse::Call::CallAttempt::SpeechEvent::Speaker::TaggedSymbol
4980
+ )
4981
+ end
4982
+ attr_accessor :speaker
4983
+
4984
+ # Milliseconds since session start when speech began.
4985
+ sig { returns(Float) }
4986
+ attr_accessor :started_speaking_at_ms
4987
+
4988
+ # Milliseconds since session start when speech ended. Null when the session ended
4989
+ # before the turn closed.
4990
+ sig { returns(T.nilable(Float)) }
4991
+ attr_accessor :stopped_speaking_at_ms
4992
+
4993
+ # User-only: time from end-of-speech to final transcript, in ms.
4994
+ sig { returns(T.nilable(Float)) }
4995
+ attr_accessor :stt_transcription_delay_ms
4996
+
4997
+ # Recognized text for this segment, when available.
4998
+ sig { returns(T.nilable(String)) }
4999
+ attr_accessor :transcript
5000
+
5001
+ # Agent-only: TTS time-to-first-audio-byte for the reply, in ms.
5002
+ sig { returns(T.nilable(Float)) }
5003
+ attr_accessor :tts_ttfb_ms
5004
+
5005
+ # Agent-only: true when the agent's audio was interrupted (real or auto-resumed).
5006
+ # Null on user segments.
5007
+ sig { returns(T.nilable(T::Boolean)) }
5008
+ attr_accessor :was_cut
5009
+
5010
+ sig do
5011
+ params(
5012
+ id: String,
5013
+ is_real_turn: T::Boolean,
5014
+ llm_system_prompt: T.nilable(String),
5015
+ llm_ttft_ms: T.nilable(Float),
5016
+ llm_winner_model: T.nilable(String),
5017
+ speaker:
5018
+ Revox::Models::CallSearchResponse::Call::CallAttempt::SpeechEvent::Speaker::OrSymbol,
5019
+ started_speaking_at_ms: Float,
5020
+ stopped_speaking_at_ms: T.nilable(Float),
5021
+ stt_transcription_delay_ms: T.nilable(Float),
5022
+ transcript: T.nilable(String),
5023
+ tts_ttfb_ms: T.nilable(Float),
5024
+ was_cut: T.nilable(T::Boolean)
5025
+ ).returns(T.attached_class)
5026
+ end
5027
+ def self.new(
5028
+ id:,
5029
+ # False when the segment was flagged as noise/blip rather than a meaningful turn.
5030
+ is_real_turn:,
5031
+ # Agent-only: despite the name, the whole prompt the LLM was given for this turn —
5032
+ # system instructions plus conversation history — as JSON.
5033
+ llm_system_prompt:,
5034
+ # Agent-only: LLM time-to-first-token for the reply, in ms.
5035
+ llm_ttft_ms:,
5036
+ # Agent-only: the model that produced the reply — the winning leg when the LLM is
5037
+ # a race, which is also the model `llm_ttft_ms` describes.
5038
+ llm_winner_model:,
5039
+ # Who was speaking during this segment.
5040
+ speaker:,
5041
+ # Milliseconds since session start when speech began.
5042
+ started_speaking_at_ms:,
5043
+ # Milliseconds since session start when speech ended. Null when the session ended
5044
+ # before the turn closed.
5045
+ stopped_speaking_at_ms:,
5046
+ # User-only: time from end-of-speech to final transcript, in ms.
5047
+ stt_transcription_delay_ms:,
5048
+ # Recognized text for this segment, when available.
5049
+ transcript:,
5050
+ # Agent-only: TTS time-to-first-audio-byte for the reply, in ms.
5051
+ tts_ttfb_ms:,
5052
+ # Agent-only: true when the agent's audio was interrupted (real or auto-resumed).
5053
+ # Null on user segments.
5054
+ was_cut:
5055
+ )
5056
+ end
5057
+
5058
+ sig do
5059
+ override.returns(
5060
+ {
5061
+ id: String,
5062
+ is_real_turn: T::Boolean,
5063
+ llm_system_prompt: T.nilable(String),
5064
+ llm_ttft_ms: T.nilable(Float),
5065
+ llm_winner_model: T.nilable(String),
5066
+ speaker:
5067
+ Revox::Models::CallSearchResponse::Call::CallAttempt::SpeechEvent::Speaker::TaggedSymbol,
5068
+ started_speaking_at_ms: Float,
5069
+ stopped_speaking_at_ms: T.nilable(Float),
5070
+ stt_transcription_delay_ms: T.nilable(Float),
5071
+ transcript: T.nilable(String),
5072
+ tts_ttfb_ms: T.nilable(Float),
5073
+ was_cut: T.nilable(T::Boolean)
5074
+ }
5075
+ )
5076
+ end
5077
+ def to_hash
5078
+ end
5079
+
5080
+ # Who was speaking during this segment.
5081
+ module Speaker
5082
+ extend Revox::Internal::Type::Enum
5083
+
5084
+ TaggedSymbol =
5085
+ T.type_alias do
5086
+ T.all(
5087
+ Symbol,
5088
+ Revox::Models::CallSearchResponse::Call::CallAttempt::SpeechEvent::Speaker
5089
+ )
5090
+ end
5091
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
5092
+
5093
+ USER =
5094
+ T.let(
5095
+ :user,
5096
+ Revox::Models::CallSearchResponse::Call::CallAttempt::SpeechEvent::Speaker::TaggedSymbol
5097
+ )
5098
+ AGENT =
5099
+ T.let(
5100
+ :agent,
5101
+ Revox::Models::CallSearchResponse::Call::CallAttempt::SpeechEvent::Speaker::TaggedSymbol
5102
+ )
5103
+
5104
+ sig do
5105
+ override.returns(
5106
+ T::Array[
5107
+ Revox::Models::CallSearchResponse::Call::CallAttempt::SpeechEvent::Speaker::TaggedSymbol
5108
+ ]
5109
+ )
5110
+ end
5111
+ def self.values
5112
+ end
5113
+ end
5114
+ end
5115
+
4647
5116
  class Transcript < Revox::Internal::Type::BaseModel
4648
5117
  OrHash =
4649
5118
  T.type_alias do
@@ -4988,7 +5457,8 @@ module Revox
4988
5457
  sig { returns(String) }
4989
5458
  attr_accessor :calling_window_start_time
4990
5459
 
4991
- # Delay between retry attempts in seconds. Default: 7200 (2 hours).
5460
+ # Delay between retry attempts in seconds. 0 retries as soon as the calling window
5461
+ # allows. Default: 7200 (2 hours).
4992
5462
  sig { returns(Integer) }
4993
5463
  attr_accessor :retry_delay_seconds
4994
5464
 
@@ -5008,7 +5478,8 @@ module Revox
5008
5478
  # timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
5009
5479
  # Examples: '09:00', '10am'. Default: '10:00'.
5010
5480
  calling_window_start_time:,
5011
- # Delay between retry attempts in seconds. Default: 7200 (2 hours).
5481
+ # Delay between retry attempts in seconds. 0 retries as soon as the calling window
5482
+ # allows. Default: 7200 (2 hours).
5012
5483
  retry_delay_seconds:
5013
5484
  )
5014
5485
  end
@@ -5069,6 +5540,9 @@ module Revox
5069
5540
  sig { returns(T.nilable(String)) }
5070
5541
  attr_accessor :first_name
5071
5542
 
5543
+ sig { returns(T.nilable(String)) }
5544
+ attr_accessor :job_title
5545
+
5072
5546
  sig { returns(T.nilable(String)) }
5073
5547
  attr_accessor :last_name
5074
5548
 
@@ -5079,10 +5553,11 @@ module Revox
5079
5553
  company: T.nilable(String),
5080
5554
  email: T.nilable(String),
5081
5555
  first_name: T.nilable(String),
5556
+ job_title: T.nilable(String),
5082
5557
  last_name: T.nilable(String)
5083
5558
  ).returns(T.attached_class)
5084
5559
  end
5085
- def self.new(company:, email:, first_name:, last_name:)
5560
+ def self.new(company:, email:, first_name:, job_title:, last_name:)
5086
5561
  end
5087
5562
 
5088
5563
  sig do
@@ -5091,6 +5566,7 @@ module Revox
5091
5566
  company: T.nilable(String),
5092
5567
  email: T.nilable(String),
5093
5568
  first_name: T.nilable(String),
5569
+ job_title: T.nilable(String),
5094
5570
  last_name: T.nilable(String)
5095
5571
  }
5096
5572
  )
@@ -5162,6 +5638,37 @@ module Revox
5162
5638
  sig { returns(T.anything) }
5163
5639
  attr_accessor :ended_at
5164
5640
 
5641
+ # Whether the AI agent conducted the conversation on this attempt. False for a
5642
+ # silent speed-dial probe (whose agent only detects a human) and for attempts that
5643
+ # were never answered.
5644
+ sig { returns(T::Boolean) }
5645
+ attr_accessor :handled_by_ai
5646
+
5647
+ # Whether a human operator conducted (part of) this attempt — a jump-in takeover
5648
+ # or a speed-dial operator connection (both stamp human_takeover_at).
5649
+ sig { returns(T::Boolean) }
5650
+ attr_accessor :handled_by_human
5651
+
5652
+ # The team member responsible for following up on this call.
5653
+ sig do
5654
+ returns(
5655
+ T.nilable(
5656
+ Revox::Models::CallSearchResponse::Call::LastCallAttempt::HandledByUser
5657
+ )
5658
+ )
5659
+ end
5660
+ attr_reader :handled_by_user
5661
+
5662
+ sig do
5663
+ params(
5664
+ handled_by_user:
5665
+ T.nilable(
5666
+ Revox::Models::CallSearchResponse::Call::LastCallAttempt::HandledByUser::OrHash
5667
+ )
5668
+ ).void
5669
+ end
5670
+ attr_writer :handled_by_user
5671
+
5165
5672
  # The phone number that was called. Formatted in E.164 format. Example:
5166
5673
  # +1234567890
5167
5674
  sig { returns(String) }
@@ -5196,6 +5703,19 @@ module Revox
5196
5703
  sig { returns(T.nilable(T::Array[String])) }
5197
5704
  attr_accessor :assistants_used
5198
5705
 
5706
+ # Notification emails sent in connection with the call, ordered oldest first
5707
+ # (from/to addresses, subject, sent time).
5708
+ sig do
5709
+ returns(
5710
+ T.nilable(
5711
+ T::Array[
5712
+ Revox::Models::CallSearchResponse::Call::LastCallAttempt::EmailLog
5713
+ ]
5714
+ )
5715
+ )
5716
+ end
5717
+ attr_accessor :email_log
5718
+
5199
5719
  # Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call',
5200
5720
  # 'voicemail', 'transfer', 'ivr_no_navigate'.
5201
5721
  sig do
@@ -5229,21 +5749,35 @@ module Revox
5229
5749
  )
5230
5750
  )
5231
5751
  end
5232
- attr_accessor :post_call_transcript
5752
+ attr_accessor :post_call_transcript
5753
+
5754
+ # Automatic SMS sent after the call (voicemail and after-call), ordered oldest
5755
+ # first. The in-call `send_sms` is excluded — it already appears in the transcript
5756
+ # as a tool call.
5757
+ sig do
5758
+ returns(
5759
+ T.nilable(
5760
+ T::Array[
5761
+ Revox::Models::CallSearchResponse::Call::LastCallAttempt::SMSLog
5762
+ ]
5763
+ )
5764
+ )
5765
+ end
5766
+ attr_accessor :sms_log
5233
5767
 
5234
- # Automatic SMS sent after the call (voicemail and after-call), ordered oldest
5235
- # first. The in-call `send_sms` is excluded it already appears in the transcript
5236
- # as a tool call.
5768
+ # Per-turn speech segments (VAD-derived) with timing and pipeline latencies,
5769
+ # ordered by started_speaking_at_ms. Empty for calls recorded before this was
5770
+ # tracked or for realtime sessions that don't emit them.
5237
5771
  sig do
5238
5772
  returns(
5239
5773
  T.nilable(
5240
5774
  T::Array[
5241
- Revox::Models::CallSearchResponse::Call::LastCallAttempt::SMSLog
5775
+ Revox::Models::CallSearchResponse::Call::LastCallAttempt::SpeechEvent
5242
5776
  ]
5243
5777
  )
5244
5778
  )
5245
5779
  end
5246
- attr_accessor :sms_log
5780
+ attr_accessor :speech_events
5247
5781
 
5248
5782
  # The data extracted from the call, using the structured output config from the
5249
5783
  # parent call object.
@@ -5273,6 +5807,12 @@ module Revox
5273
5807
  Revox::Models::CallSearchResponse::Call::LastCallAttempt::DialError::OrSymbol
5274
5808
  ),
5275
5809
  ended_at: T.anything,
5810
+ handled_by_ai: T::Boolean,
5811
+ handled_by_human: T::Boolean,
5812
+ handled_by_user:
5813
+ T.nilable(
5814
+ Revox::Models::CallSearchResponse::Call::LastCallAttempt::HandledByUser::OrHash
5815
+ ),
5276
5816
  phone_number: String,
5277
5817
  recording_url: T.nilable(String),
5278
5818
  result:
@@ -5283,6 +5823,12 @@ module Revox
5283
5823
  status:
5284
5824
  Revox::Models::CallSearchResponse::Call::LastCallAttempt::Status::OrSymbol,
5285
5825
  assistants_used: T.nilable(T::Array[String]),
5826
+ email_log:
5827
+ T.nilable(
5828
+ T::Array[
5829
+ Revox::Models::CallSearchResponse::Call::LastCallAttempt::EmailLog::OrHash
5830
+ ]
5831
+ ),
5286
5832
  end_reason:
5287
5833
  T.nilable(
5288
5834
  Revox::Models::CallSearchResponse::Call::LastCallAttempt::EndReason::OrSymbol
@@ -5303,6 +5849,12 @@ module Revox
5303
5849
  Revox::Models::CallSearchResponse::Call::LastCallAttempt::SMSLog::OrHash
5304
5850
  ]
5305
5851
  ),
5852
+ speech_events:
5853
+ T.nilable(
5854
+ T::Array[
5855
+ Revox::Models::CallSearchResponse::Call::LastCallAttempt::SpeechEvent::OrHash
5856
+ ]
5857
+ ),
5306
5858
  structured_output: T.nilable(T::Hash[Symbol, T.anything]),
5307
5859
  transcript:
5308
5860
  T.nilable(
@@ -5321,6 +5873,15 @@ module Revox
5321
5873
  dial_error:,
5322
5874
  # The time the call ended.
5323
5875
  ended_at:,
5876
+ # Whether the AI agent conducted the conversation on this attempt. False for a
5877
+ # silent speed-dial probe (whose agent only detects a human) and for attempts that
5878
+ # were never answered.
5879
+ handled_by_ai:,
5880
+ # Whether a human operator conducted (part of) this attempt — a jump-in takeover
5881
+ # or a speed-dial operator connection (both stamp human_takeover_at).
5882
+ handled_by_human:,
5883
+ # The team member responsible for following up on this call.
5884
+ handled_by_user:,
5324
5885
  # The phone number that was called. Formatted in E.164 format. Example:
5325
5886
  # +1234567890
5326
5887
  phone_number:,
@@ -5333,6 +5894,9 @@ module Revox
5333
5894
  status:,
5334
5895
  # Assistant node ids entered during this attempt, in traversal order.
5335
5896
  assistants_used: nil,
5897
+ # Notification emails sent in connection with the call, ordered oldest first
5898
+ # (from/to addresses, subject, sent time).
5899
+ email_log: nil,
5336
5900
  # Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call',
5337
5901
  # 'voicemail', 'transfer', 'ivr_no_navigate'.
5338
5902
  end_reason: nil,
@@ -5346,6 +5910,10 @@ module Revox
5346
5910
  # first. The in-call `send_sms` is excluded — it already appears in the transcript
5347
5911
  # as a tool call.
5348
5912
  sms_log: nil,
5913
+ # Per-turn speech segments (VAD-derived) with timing and pipeline latencies,
5914
+ # ordered by started_speaking_at_ms. Empty for calls recorded before this was
5915
+ # tracked or for realtime sessions that don't emit them.
5916
+ speech_events: nil,
5349
5917
  # The data extracted from the call, using the structured output config from the
5350
5918
  # parent call object.
5351
5919
  structured_output: nil,
@@ -5364,6 +5932,12 @@ module Revox
5364
5932
  Revox::Models::CallSearchResponse::Call::LastCallAttempt::DialError::TaggedSymbol
5365
5933
  ),
5366
5934
  ended_at: T.anything,
5935
+ handled_by_ai: T::Boolean,
5936
+ handled_by_human: T::Boolean,
5937
+ handled_by_user:
5938
+ T.nilable(
5939
+ Revox::Models::CallSearchResponse::Call::LastCallAttempt::HandledByUser
5940
+ ),
5367
5941
  phone_number: String,
5368
5942
  recording_url: T.nilable(String),
5369
5943
  result:
@@ -5374,6 +5948,12 @@ module Revox
5374
5948
  status:
5375
5949
  Revox::Models::CallSearchResponse::Call::LastCallAttempt::Status::TaggedSymbol,
5376
5950
  assistants_used: T.nilable(T::Array[String]),
5951
+ email_log:
5952
+ T.nilable(
5953
+ T::Array[
5954
+ Revox::Models::CallSearchResponse::Call::LastCallAttempt::EmailLog
5955
+ ]
5956
+ ),
5377
5957
  end_reason:
5378
5958
  T.nilable(
5379
5959
  Revox::Models::CallSearchResponse::Call::LastCallAttempt::EndReason::TaggedSymbol
@@ -5394,6 +5974,12 @@ module Revox
5394
5974
  Revox::Models::CallSearchResponse::Call::LastCallAttempt::SMSLog
5395
5975
  ]
5396
5976
  ),
5977
+ speech_events:
5978
+ T.nilable(
5979
+ T::Array[
5980
+ Revox::Models::CallSearchResponse::Call::LastCallAttempt::SpeechEvent
5981
+ ]
5982
+ ),
5397
5983
  structured_output: T.nilable(T::Hash[Symbol, T.anything]),
5398
5984
  transcript:
5399
5985
  T.nilable(
@@ -5472,6 +6058,60 @@ module Revox
5472
6058
  end
5473
6059
  end
5474
6060
 
6061
+ class HandledByUser < Revox::Internal::Type::BaseModel
6062
+ OrHash =
6063
+ T.type_alias do
6064
+ T.any(
6065
+ Revox::Models::CallSearchResponse::Call::LastCallAttempt::HandledByUser,
6066
+ Revox::Internal::AnyHash
6067
+ )
6068
+ end
6069
+
6070
+ # The database user id of the assignee.
6071
+ sig { returns(String) }
6072
+ attr_accessor :id
6073
+
6074
+ sig { returns(String) }
6075
+ attr_accessor :email
6076
+
6077
+ sig { returns(T.nilable(String)) }
6078
+ attr_accessor :first_name
6079
+
6080
+ sig { returns(T.nilable(String)) }
6081
+ attr_accessor :last_name
6082
+
6083
+ # The team member responsible for following up on this call.
6084
+ sig do
6085
+ params(
6086
+ id: String,
6087
+ email: String,
6088
+ first_name: T.nilable(String),
6089
+ last_name: T.nilable(String)
6090
+ ).returns(T.attached_class)
6091
+ end
6092
+ def self.new(
6093
+ # The database user id of the assignee.
6094
+ id:,
6095
+ email:,
6096
+ first_name:,
6097
+ last_name:
6098
+ )
6099
+ end
6100
+
6101
+ sig do
6102
+ override.returns(
6103
+ {
6104
+ id: String,
6105
+ email: String,
6106
+ first_name: T.nilable(String),
6107
+ last_name: T.nilable(String)
6108
+ }
6109
+ )
6110
+ end
6111
+ def to_hash
6112
+ end
6113
+ end
6114
+
5475
6115
  module Result
5476
6116
  extend Revox::Internal::Type::Enum
5477
6117
 
@@ -5571,6 +6211,71 @@ module Revox
5571
6211
  end
5572
6212
  end
5573
6213
 
6214
+ class EmailLog < Revox::Internal::Type::BaseModel
6215
+ OrHash =
6216
+ T.type_alias do
6217
+ T.any(
6218
+ Revox::Models::CallSearchResponse::Call::LastCallAttempt::EmailLog,
6219
+ Revox::Internal::AnyHash
6220
+ )
6221
+ end
6222
+
6223
+ sig { returns(String) }
6224
+ attr_accessor :id
6225
+
6226
+ # When the email was sent.
6227
+ sig { returns(T.anything) }
6228
+ attr_accessor :created_at
6229
+
6230
+ sig { returns(String) }
6231
+ attr_accessor :from_address
6232
+
6233
+ sig { returns(T.nilable(String)) }
6234
+ attr_accessor :resend_message_id
6235
+
6236
+ sig { returns(String) }
6237
+ attr_accessor :subject
6238
+
6239
+ sig { returns(T::Array[String]) }
6240
+ attr_accessor :to_emails
6241
+
6242
+ sig do
6243
+ params(
6244
+ id: String,
6245
+ created_at: T.anything,
6246
+ from_address: String,
6247
+ resend_message_id: T.nilable(String),
6248
+ subject: String,
6249
+ to_emails: T::Array[String]
6250
+ ).returns(T.attached_class)
6251
+ end
6252
+ def self.new(
6253
+ id:,
6254
+ # When the email was sent.
6255
+ created_at:,
6256
+ from_address:,
6257
+ resend_message_id:,
6258
+ subject:,
6259
+ to_emails:
6260
+ )
6261
+ end
6262
+
6263
+ sig do
6264
+ override.returns(
6265
+ {
6266
+ id: String,
6267
+ created_at: T.anything,
6268
+ from_address: String,
6269
+ resend_message_id: T.nilable(String),
6270
+ subject: String,
6271
+ to_emails: T::Array[String]
6272
+ }
6273
+ )
6274
+ end
6275
+ def to_hash
6276
+ end
6277
+ end
6278
+
5574
6279
  # Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call',
5575
6280
  # 'voicemail', 'transfer', 'ivr_no_navigate'.
5576
6281
  module EndReason
@@ -5898,11 +6603,18 @@ module Revox
5898
6603
  sig { returns(String) }
5899
6604
  attr_accessor :message_body
5900
6605
 
5901
- sig { returns(String) }
5902
- attr_accessor :to_phone_number
6606
+ sig do
6607
+ returns(
6608
+ Revox::Models::CallSearchResponse::Call::LastCallAttempt::SMSLog::Provider::TaggedSymbol
6609
+ )
6610
+ end
6611
+ attr_accessor :provider
5903
6612
 
5904
6613
  sig { returns(T.nilable(String)) }
5905
- attr_accessor :twilio_message_sid
6614
+ attr_accessor :provider_message_id
6615
+
6616
+ sig { returns(String) }
6617
+ attr_accessor :to_phone_number
5906
6618
 
5907
6619
  sig do
5908
6620
  returns(
@@ -5916,8 +6628,10 @@ module Revox
5916
6628
  id: String,
5917
6629
  created_at: T.anything,
5918
6630
  message_body: String,
6631
+ provider:
6632
+ Revox::Models::CallSearchResponse::Call::LastCallAttempt::SMSLog::Provider::OrSymbol,
6633
+ provider_message_id: T.nilable(String),
5919
6634
  to_phone_number: String,
5920
- twilio_message_sid: T.nilable(String),
5921
6635
  type:
5922
6636
  Revox::Models::CallSearchResponse::Call::LastCallAttempt::SMSLog::Type::OrSymbol
5923
6637
  ).returns(T.attached_class)
@@ -5927,8 +6641,9 @@ module Revox
5927
6641
  # When the SMS was sent.
5928
6642
  created_at:,
5929
6643
  message_body:,
6644
+ provider:,
6645
+ provider_message_id:,
5930
6646
  to_phone_number:,
5931
- twilio_message_sid:,
5932
6647
  type:
5933
6648
  )
5934
6649
  end
@@ -5939,8 +6654,10 @@ module Revox
5939
6654
  id: String,
5940
6655
  created_at: T.anything,
5941
6656
  message_body: String,
6657
+ provider:
6658
+ Revox::Models::CallSearchResponse::Call::LastCallAttempt::SMSLog::Provider::TaggedSymbol,
6659
+ provider_message_id: T.nilable(String),
5942
6660
  to_phone_number: String,
5943
- twilio_message_sid: T.nilable(String),
5944
6661
  type:
5945
6662
  Revox::Models::CallSearchResponse::Call::LastCallAttempt::SMSLog::Type::TaggedSymbol
5946
6663
  }
@@ -5949,6 +6666,40 @@ module Revox
5949
6666
  def to_hash
5950
6667
  end
5951
6668
 
6669
+ module Provider
6670
+ extend Revox::Internal::Type::Enum
6671
+
6672
+ TaggedSymbol =
6673
+ T.type_alias do
6674
+ T.all(
6675
+ Symbol,
6676
+ Revox::Models::CallSearchResponse::Call::LastCallAttempt::SMSLog::Provider
6677
+ )
6678
+ end
6679
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
6680
+
6681
+ TWILIO =
6682
+ T.let(
6683
+ :twilio,
6684
+ Revox::Models::CallSearchResponse::Call::LastCallAttempt::SMSLog::Provider::TaggedSymbol
6685
+ )
6686
+ VONAGE =
6687
+ T.let(
6688
+ :vonage,
6689
+ Revox::Models::CallSearchResponse::Call::LastCallAttempt::SMSLog::Provider::TaggedSymbol
6690
+ )
6691
+
6692
+ sig do
6693
+ override.returns(
6694
+ T::Array[
6695
+ Revox::Models::CallSearchResponse::Call::LastCallAttempt::SMSLog::Provider::TaggedSymbol
6696
+ ]
6697
+ )
6698
+ end
6699
+ def self.values
6700
+ end
6701
+ end
6702
+
5952
6703
  module Type
5953
6704
  extend Revox::Internal::Type::Enum
5954
6705
 
@@ -5989,6 +6740,176 @@ module Revox
5989
6740
  end
5990
6741
  end
5991
6742
 
6743
+ class SpeechEvent < Revox::Internal::Type::BaseModel
6744
+ OrHash =
6745
+ T.type_alias do
6746
+ T.any(
6747
+ Revox::Models::CallSearchResponse::Call::LastCallAttempt::SpeechEvent,
6748
+ Revox::Internal::AnyHash
6749
+ )
6750
+ end
6751
+
6752
+ sig { returns(String) }
6753
+ attr_accessor :id
6754
+
6755
+ # False when the segment was flagged as noise/blip rather than a meaningful turn.
6756
+ sig { returns(T::Boolean) }
6757
+ attr_accessor :is_real_turn
6758
+
6759
+ # Agent-only: despite the name, the whole prompt the LLM was given for this turn —
6760
+ # system instructions plus conversation history — as JSON.
6761
+ sig { returns(T.nilable(String)) }
6762
+ attr_accessor :llm_system_prompt
6763
+
6764
+ # Agent-only: LLM time-to-first-token for the reply, in ms.
6765
+ sig { returns(T.nilable(Float)) }
6766
+ attr_accessor :llm_ttft_ms
6767
+
6768
+ # Agent-only: the model that produced the reply — the winning leg when the LLM is
6769
+ # a race, which is also the model `llm_ttft_ms` describes.
6770
+ sig { returns(T.nilable(String)) }
6771
+ attr_accessor :llm_winner_model
6772
+
6773
+ # Who was speaking during this segment.
6774
+ sig do
6775
+ returns(
6776
+ Revox::Models::CallSearchResponse::Call::LastCallAttempt::SpeechEvent::Speaker::TaggedSymbol
6777
+ )
6778
+ end
6779
+ attr_accessor :speaker
6780
+
6781
+ # Milliseconds since session start when speech began.
6782
+ sig { returns(Float) }
6783
+ attr_accessor :started_speaking_at_ms
6784
+
6785
+ # Milliseconds since session start when speech ended. Null when the session ended
6786
+ # before the turn closed.
6787
+ sig { returns(T.nilable(Float)) }
6788
+ attr_accessor :stopped_speaking_at_ms
6789
+
6790
+ # User-only: time from end-of-speech to final transcript, in ms.
6791
+ sig { returns(T.nilable(Float)) }
6792
+ attr_accessor :stt_transcription_delay_ms
6793
+
6794
+ # Recognized text for this segment, when available.
6795
+ sig { returns(T.nilable(String)) }
6796
+ attr_accessor :transcript
6797
+
6798
+ # Agent-only: TTS time-to-first-audio-byte for the reply, in ms.
6799
+ sig { returns(T.nilable(Float)) }
6800
+ attr_accessor :tts_ttfb_ms
6801
+
6802
+ # Agent-only: true when the agent's audio was interrupted (real or auto-resumed).
6803
+ # Null on user segments.
6804
+ sig { returns(T.nilable(T::Boolean)) }
6805
+ attr_accessor :was_cut
6806
+
6807
+ sig do
6808
+ params(
6809
+ id: String,
6810
+ is_real_turn: T::Boolean,
6811
+ llm_system_prompt: T.nilable(String),
6812
+ llm_ttft_ms: T.nilable(Float),
6813
+ llm_winner_model: T.nilable(String),
6814
+ speaker:
6815
+ Revox::Models::CallSearchResponse::Call::LastCallAttempt::SpeechEvent::Speaker::OrSymbol,
6816
+ started_speaking_at_ms: Float,
6817
+ stopped_speaking_at_ms: T.nilable(Float),
6818
+ stt_transcription_delay_ms: T.nilable(Float),
6819
+ transcript: T.nilable(String),
6820
+ tts_ttfb_ms: T.nilable(Float),
6821
+ was_cut: T.nilable(T::Boolean)
6822
+ ).returns(T.attached_class)
6823
+ end
6824
+ def self.new(
6825
+ id:,
6826
+ # False when the segment was flagged as noise/blip rather than a meaningful turn.
6827
+ is_real_turn:,
6828
+ # Agent-only: despite the name, the whole prompt the LLM was given for this turn —
6829
+ # system instructions plus conversation history — as JSON.
6830
+ llm_system_prompt:,
6831
+ # Agent-only: LLM time-to-first-token for the reply, in ms.
6832
+ llm_ttft_ms:,
6833
+ # Agent-only: the model that produced the reply — the winning leg when the LLM is
6834
+ # a race, which is also the model `llm_ttft_ms` describes.
6835
+ llm_winner_model:,
6836
+ # Who was speaking during this segment.
6837
+ speaker:,
6838
+ # Milliseconds since session start when speech began.
6839
+ started_speaking_at_ms:,
6840
+ # Milliseconds since session start when speech ended. Null when the session ended
6841
+ # before the turn closed.
6842
+ stopped_speaking_at_ms:,
6843
+ # User-only: time from end-of-speech to final transcript, in ms.
6844
+ stt_transcription_delay_ms:,
6845
+ # Recognized text for this segment, when available.
6846
+ transcript:,
6847
+ # Agent-only: TTS time-to-first-audio-byte for the reply, in ms.
6848
+ tts_ttfb_ms:,
6849
+ # Agent-only: true when the agent's audio was interrupted (real or auto-resumed).
6850
+ # Null on user segments.
6851
+ was_cut:
6852
+ )
6853
+ end
6854
+
6855
+ sig do
6856
+ override.returns(
6857
+ {
6858
+ id: String,
6859
+ is_real_turn: T::Boolean,
6860
+ llm_system_prompt: T.nilable(String),
6861
+ llm_ttft_ms: T.nilable(Float),
6862
+ llm_winner_model: T.nilable(String),
6863
+ speaker:
6864
+ Revox::Models::CallSearchResponse::Call::LastCallAttempt::SpeechEvent::Speaker::TaggedSymbol,
6865
+ started_speaking_at_ms: Float,
6866
+ stopped_speaking_at_ms: T.nilable(Float),
6867
+ stt_transcription_delay_ms: T.nilable(Float),
6868
+ transcript: T.nilable(String),
6869
+ tts_ttfb_ms: T.nilable(Float),
6870
+ was_cut: T.nilable(T::Boolean)
6871
+ }
6872
+ )
6873
+ end
6874
+ def to_hash
6875
+ end
6876
+
6877
+ # Who was speaking during this segment.
6878
+ module Speaker
6879
+ extend Revox::Internal::Type::Enum
6880
+
6881
+ TaggedSymbol =
6882
+ T.type_alias do
6883
+ T.all(
6884
+ Symbol,
6885
+ Revox::Models::CallSearchResponse::Call::LastCallAttempt::SpeechEvent::Speaker
6886
+ )
6887
+ end
6888
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
6889
+
6890
+ USER =
6891
+ T.let(
6892
+ :user,
6893
+ Revox::Models::CallSearchResponse::Call::LastCallAttempt::SpeechEvent::Speaker::TaggedSymbol
6894
+ )
6895
+ AGENT =
6896
+ T.let(
6897
+ :agent,
6898
+ Revox::Models::CallSearchResponse::Call::LastCallAttempt::SpeechEvent::Speaker::TaggedSymbol
6899
+ )
6900
+
6901
+ sig do
6902
+ override.returns(
6903
+ T::Array[
6904
+ Revox::Models::CallSearchResponse::Call::LastCallAttempt::SpeechEvent::Speaker::TaggedSymbol
6905
+ ]
6906
+ )
6907
+ end
6908
+ def self.values
6909
+ end
6910
+ end
6911
+ end
6912
+
5992
6913
  class Transcript < Revox::Internal::Type::BaseModel
5993
6914
  OrHash =
5994
6915
  T.type_alias do
@@ -6494,6 +7415,11 @@ module Revox
6494
7415
  :post_processing,
6495
7416
  Revox::Models::CallSearchResponse::Call::Status::TaggedSymbol
6496
7417
  )
7418
+ NOT_LAUNCHED =
7419
+ T.let(
7420
+ :not_launched,
7421
+ Revox::Models::CallSearchResponse::Call::Status::TaggedSymbol
7422
+ )
6497
7423
  SCHEDULED =
6498
7424
  T.let(
6499
7425
  :scheduled,
@@ -6561,21 +7487,6 @@ module Revox
6561
7487
  :requested_callback_later,
6562
7488
  Revox::Models::CallSearchResponse::Call::Outcome::TaggedSymbol
6563
7489
  )
6564
- REQUESTED_CALLBACK_NEW_NUMBER =
6565
- T.let(
6566
- :requested_callback_new_number,
6567
- Revox::Models::CallSearchResponse::Call::Outcome::TaggedSymbol
6568
- )
6569
- DO_NOT_CONTACT =
6570
- T.let(
6571
- :do_not_contact,
6572
- Revox::Models::CallSearchResponse::Call::Outcome::TaggedSymbol
6573
- )
6574
- AI_AVERSE =
6575
- T.let(
6576
- :ai_averse,
6577
- Revox::Models::CallSearchResponse::Call::Outcome::TaggedSymbol
6578
- )
6579
7490
 
6580
7491
  sig do
6581
7492
  override.returns(