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
@@ -209,13 +209,6 @@ module Revox
209
209
  # @return [String, nil]
210
210
  required :email_notification_address, String, nil?: true
211
211
 
212
- # @!attribute email_notification_language
213
- # The language used for the notification email content. One of "en" or "fr".
214
- #
215
- # @return [Symbol, Revox::Models::PhoneNumberUpdateResponse::PhoneNumber::InboundAssistant::EmailNotificationLanguage]
216
- required :email_notification_language,
217
- enum: -> { Revox::Models::PhoneNumberUpdateResponse::PhoneNumber::InboundAssistant::EmailNotificationLanguage }
218
-
219
212
  # @!attribute email_notification_outcomes
220
213
  # Which call outcomes trigger an email notification. E.g. ["interested",
221
214
  # "completed", "none"]. Use "none" when outcome is null.
@@ -255,8 +248,8 @@ module Revox
255
248
  required :from_phone_number, String, nil?: true
256
249
 
257
250
  # @!attribute human_transfer_mode
258
- # Warm or cold transfer when transfer_phone_number is set; null when transfer is
259
- # not configured.
251
+ # Warm or cold transfer when transfer_destinations is non-empty; null when
252
+ # transfer is not configured.
260
253
  #
261
254
  # @return [Symbol, Revox::Models::PhoneNumberUpdateResponse::PhoneNumber::InboundAssistant::HumanTransferMode, nil]
262
255
  required :human_transfer_mode,
@@ -315,6 +308,13 @@ module Revox
315
308
  -> { Revox::Models::PhoneNumberUpdateResponse::PhoneNumber::InboundAssistant::Position },
316
309
  nil?: true
317
310
 
311
+ # @!attribute precall_lookup_url
312
+ # URL fetched before an inbound call is answered to resolve the assistant's prompt
313
+ # variables. Null when no lookup is configured.
314
+ #
315
+ # @return [String, nil]
316
+ required :precall_lookup_url, String, nil?: true
317
+
318
318
  # @!attribute prompt
319
319
  #
320
320
  # @return [String]
@@ -405,11 +405,14 @@ module Revox
405
405
  # @return [Float]
406
406
  required :thinking_sound_volume, Float
407
407
 
408
- # @!attribute transfer_phone_number
409
- # Phone number to transfer calls to when users request to speak to a human agent.
408
+ # @!attribute transfer_destinations
409
+ # Where calls can be transferred to when users ask to speak to a human. Null or
410
+ # empty when transfer is not configured.
410
411
  #
411
- # @return [String, nil]
412
- required :transfer_phone_number, String, nil?: true
412
+ # @return [Array<Revox::Models::PhoneNumberUpdateResponse::PhoneNumber::InboundAssistant::TransferDestination>, nil]
413
+ required :transfer_destinations,
414
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::PhoneNumberUpdateResponse::PhoneNumber::InboundAssistant::TransferDestination] },
415
+ nil?: true
413
416
 
414
417
  # @!attribute type
415
418
  #
@@ -476,6 +479,11 @@ module Revox
476
479
  optional :faq_items,
477
480
  -> { Revox::Internal::Type::ArrayOf[Revox::Models::PhoneNumberUpdateResponse::PhoneNumber::InboundAssistant::FaqItem] }
478
481
 
482
+ # @!attribute is_inbound_receptionist
483
+ #
484
+ # @return [Boolean, nil]
485
+ optional :is_inbound_receptionist, Revox::Internal::Type::Boolean
486
+
479
487
  # @!attribute is_realestate_assistant
480
488
  #
481
489
  # @return [Boolean, nil]
@@ -486,7 +494,7 @@ module Revox
486
494
  # @return [Float, nil]
487
495
  optional :pending_faq_count, Float
488
496
 
489
- # @!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)
497
+ # @!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)
490
498
  # Some parameter documentations has been truncated, see
491
499
  # {Revox::Models::PhoneNumberUpdateResponse::PhoneNumber::InboundAssistant} for
492
500
  # more details.
@@ -513,8 +521,6 @@ module Revox
513
521
  #
514
522
  # @param email_notification_address [String, nil] Email address(es) to receive notifications when a call ends with a matching outc
515
523
  #
516
- # @param email_notification_language [Symbol, Revox::Models::PhoneNumberUpdateResponse::PhoneNumber::InboundAssistant::EmailNotificationLanguage] The language used for the notification email content. One of "en" or "fr".
517
- #
518
524
  # @param email_notification_outcomes [Array<Symbol, Revox::Models::PhoneNumberUpdateResponse::PhoneNumber::InboundAssistant::EmailNotificationOutcome>, nil] Which call outcomes trigger an email notification. E.g. ["interested", "complete
519
525
  #
520
526
  # @param end_of_call_sentence [String, nil]
@@ -527,7 +533,7 @@ module Revox
527
533
  #
528
534
  # @param from_phone_number [String, nil] Override the default outbound phone number for calls placed with this assistant.
529
535
  #
530
- # @param human_transfer_mode [Symbol, Revox::Models::PhoneNumberUpdateResponse::PhoneNumber::InboundAssistant::HumanTransferMode, nil] Warm or cold transfer when transfer_phone_number is set; null when transfer is n
536
+ # @param human_transfer_mode [Symbol, Revox::Models::PhoneNumberUpdateResponse::PhoneNumber::InboundAssistant::HumanTransferMode, nil] Warm or cold transfer when transfer_destinations is non-empty; null when transfe
531
537
  #
532
538
  # @param ivr_navigation_enabled [Boolean] Enable IVR navigation tools. When enabled, the assistant can send DTMF tones and
533
539
  #
@@ -545,6 +551,8 @@ module Revox
545
551
  #
546
552
  # @param position [Revox::Models::PhoneNumberUpdateResponse::PhoneNumber::InboundAssistant::Position, nil]
547
553
  #
554
+ # @param precall_lookup_url [String, nil] URL fetched before an inbound call is answered to resolve the assistant's prompt
555
+ #
548
556
  # @param prompt [String]
549
557
  #
550
558
  # @param prompt_flow [Revox::Models::PhoneNumberUpdateResponse::PhoneNumber::InboundAssistant::PromptFlow, nil]
@@ -569,7 +577,7 @@ module Revox
569
577
  #
570
578
  # @param thinking_sound_volume [Float] Volume of the thinking sound (0 = silent, 1 = max).
571
579
  #
572
- # @param transfer_phone_number [String, nil] Phone number to transfer calls to when users request to speak to a human agent.
580
+ # @param transfer_destinations [Array<Revox::Models::PhoneNumberUpdateResponse::PhoneNumber::InboundAssistant::TransferDestination>, nil] Where calls can be transferred to when users ask to speak to a human. Null or em
573
581
  #
574
582
  # @param type [Symbol, Revox::Models::PhoneNumberUpdateResponse::PhoneNumber::InboundAssistant::Type]
575
583
  #
@@ -591,6 +599,8 @@ module Revox
591
599
  #
592
600
  # @param faq_items [Array<Revox::Models::PhoneNumberUpdateResponse::PhoneNumber::InboundAssistant::FaqItem>]
593
601
  #
602
+ # @param is_inbound_receptionist [Boolean]
603
+ #
594
604
  # @param is_realestate_assistant [Boolean]
595
605
  #
596
606
  # @param pending_faq_count [Float]
@@ -602,9 +612,6 @@ module Revox
602
612
  INTERESTED = :interested
603
613
  COMPLETED = :completed
604
614
  REQUESTED_CALLBACK_LATER = :requested_callback_later
605
- REQUESTED_CALLBACK_NEW_NUMBER = :requested_callback_new_number
606
- DO_NOT_CONTACT = :do_not_contact
607
- AI_AVERSE = :ai_averse
608
615
  NONE = :none
609
616
 
610
617
  # @!method self.values
@@ -738,7 +745,8 @@ module Revox
738
745
  required :calling_window_start_time, String
739
746
 
740
747
  # @!attribute retry_delay_seconds
741
- # Delay between retry attempts in seconds. Default: 7200 (2 hours).
748
+ # Delay between retry attempts in seconds. 0 retries as soon as the calling window
749
+ # allows. Default: 7200 (2 hours).
742
750
  #
743
751
  # @return [Integer]
744
752
  required :retry_delay_seconds, Integer
@@ -752,7 +760,7 @@ module Revox
752
760
  #
753
761
  # @param calling_window_start_time [String] Start time for the calling window in the recipient's timezone (or timezone_overr
754
762
  #
755
- # @param retry_delay_seconds [Integer] Delay between retry attempts in seconds. Default: 7200 (2 hours).
763
+ # @param retry_delay_seconds [Integer] Delay between retry attempts in seconds. 0 retries as soon as the calling window
756
764
  end
757
765
  end
758
766
 
@@ -935,19 +943,6 @@ module Revox
935
943
  end
936
944
  end
937
945
 
938
- # The language used for the notification email content. One of "en" or "fr".
939
- #
940
- # @see Revox::Models::PhoneNumberUpdateResponse::PhoneNumber::InboundAssistant#email_notification_language
941
- module EmailNotificationLanguage
942
- extend Revox::Internal::Type::Enum
943
-
944
- EN = :en
945
- FR = :fr
946
-
947
- # @!method self.values
948
- # @return [Array<Symbol>]
949
- end
950
-
951
946
  module EmailNotificationOutcome
952
947
  extend Revox::Internal::Type::Enum
953
948
 
@@ -955,9 +950,6 @@ module Revox
955
950
  INTERESTED = :interested
956
951
  COMPLETED = :completed
957
952
  REQUESTED_CALLBACK_LATER = :requested_callback_later
958
- REQUESTED_CALLBACK_NEW_NUMBER = :requested_callback_new_number
959
- DO_NOT_CONTACT = :do_not_contact
960
- AI_AVERSE = :ai_averse
961
953
  NONE = :none
962
954
 
963
955
  # @!method self.values
@@ -976,8 +968,8 @@ module Revox
976
968
  # @return [Array<Symbol>]
977
969
  end
978
970
 
979
- # Warm or cold transfer when transfer_phone_number is set; null when transfer is
980
- # not configured.
971
+ # Warm or cold transfer when transfer_destinations is non-empty; null when
972
+ # transfer is not configured.
981
973
  #
982
974
  # @see Revox::Models::PhoneNumberUpdateResponse::PhoneNumber::InboundAssistant#human_transfer_mode
983
975
  module HumanTransferMode
@@ -1269,11 +1261,14 @@ module Revox
1269
1261
 
1270
1262
  # @see Revox::Models::PhoneNumberUpdateResponse::PhoneNumber::InboundAssistant#slack
1271
1263
  class Slack < Revox::Internal::Type::BaseModel
1272
- # @!attribute channel_id
1273
- # The Slack channel ID where the notification will be posted.
1264
+ # @!attribute channels
1265
+ # The Slack channels eligible to receive the notification. When more than one is
1266
+ # configured, the agent prompt may define routing rules to narrow it down per
1267
+ # call; with no such rules every channel here is notified.
1274
1268
  #
1275
- # @return [String]
1276
- required :channel_id, String
1269
+ # @return [Array<Revox::Models::PhoneNumberUpdateResponse::PhoneNumber::InboundAssistant::Slack::Channel>]
1270
+ required :channels,
1271
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::PhoneNumberUpdateResponse::PhoneNumber::InboundAssistant::Slack::Channel] }
1277
1272
 
1278
1273
  # @!attribute connection_id
1279
1274
  # The Nango connection ID linking the org's Slack workspace to Revox.
@@ -1289,38 +1284,54 @@ module Revox
1289
1284
  required :outcomes,
1290
1285
  -> { Revox::Internal::Type::ArrayOf[enum: Revox::Models::PhoneNumberUpdateResponse::PhoneNumber::InboundAssistant::Slack::Outcome] }
1291
1286
 
1292
- # @!attribute channel_name
1293
- # Human-readable Slack channel name, cached for display in the UI.
1294
- #
1295
- # @return [String, nil]
1296
- optional :channel_name, String, nil?: true
1297
-
1298
1287
  # @!attribute template
1299
1288
  # Optional message template. Supports {{summary}}, {{outcome}}, {{phone}},
1300
1289
  # {{call_url}}, {{assistant_name}}, {{campaign_name}}, {{first_name}},
1301
- # {{last_name}}, {{email}}, {{company}}, {{contact_name}}, {{contact_line}}, plus
1302
- # prompt_variables and structured_output keys. When null/empty a default template
1303
- # is used.
1290
+ # {{last_name}}, {{email}}, {{company}}, {{job_title}}, {{contact_name}},
1291
+ # {{contact_line}}, plus prompt_variables and structured_output keys. When
1292
+ # null/empty a default template is used.
1304
1293
  #
1305
1294
  # @return [String, nil]
1306
1295
  optional :template, String, nil?: true
1307
1296
 
1308
- # @!method initialize(channel_id:, connection_id:, outcomes:, channel_name: nil, template: nil)
1297
+ # @!method initialize(channels:, connection_id:, outcomes:, template: nil)
1309
1298
  # Some parameter documentations has been truncated, see
1310
1299
  # {Revox::Models::PhoneNumberUpdateResponse::PhoneNumber::InboundAssistant::Slack}
1311
1300
  # for more details.
1312
1301
  #
1313
- # @param channel_id [String] The Slack channel ID where the notification will be posted.
1302
+ # @param channels [Array<Revox::Models::PhoneNumberUpdateResponse::PhoneNumber::InboundAssistant::Slack::Channel>] The Slack channels eligible to receive the notification. When more than one is c
1314
1303
  #
1315
1304
  # @param connection_id [String] The Nango connection ID linking the org's Slack workspace to Revox.
1316
1305
  #
1317
1306
  # @param outcomes [Array<Symbol, Revox::Models::PhoneNumberUpdateResponse::PhoneNumber::InboundAssistant::Slack::Outcome>] Which call outcomes trigger a Slack notification (e.g. ['interested', 'none']).
1318
1307
  #
1319
- # @param channel_name [String, nil] Human-readable Slack channel name, cached for display in the UI.
1320
- #
1321
1308
  # @param template [String, nil] Optional message template. Supports {{summary}}, {{outcome}}, {{phone}},
1322
1309
  # {{call\_
1323
1310
 
1311
+ class Channel < Revox::Internal::Type::BaseModel
1312
+ # @!attribute id
1313
+ # The Slack channel ID (e.g. 'C01234567').
1314
+ #
1315
+ # @return [String]
1316
+ required :id, String
1317
+
1318
+ # @!attribute name
1319
+ # Human-readable Slack channel name, cached for display in the UI and given to the
1320
+ # LLM when the agent prompt routes by channel name.
1321
+ #
1322
+ # @return [String, nil]
1323
+ optional :name, String, nil?: true
1324
+
1325
+ # @!method initialize(id:, name: nil)
1326
+ # Some parameter documentations has been truncated, see
1327
+ # {Revox::Models::PhoneNumberUpdateResponse::PhoneNumber::InboundAssistant::Slack::Channel}
1328
+ # for more details.
1329
+ #
1330
+ # @param id [String] The Slack channel ID (e.g. 'C01234567').
1331
+ #
1332
+ # @param name [String, nil] Human-readable Slack channel name, cached for display in the UI and given to the
1333
+ end
1334
+
1324
1335
  module Outcome
1325
1336
  extend Revox::Internal::Type::Enum
1326
1337
 
@@ -1328,9 +1339,6 @@ module Revox
1328
1339
  INTERESTED = :interested
1329
1340
  COMPLETED = :completed
1330
1341
  REQUESTED_CALLBACK_LATER = :requested_callback_later
1331
- REQUESTED_CALLBACK_NEW_NUMBER = :requested_callback_new_number
1332
- DO_NOT_CONTACT = :do_not_contact
1333
- AI_AVERSE = :ai_averse
1334
1342
  NONE = :none
1335
1343
 
1336
1344
  # @!method self.values
@@ -1458,6 +1466,22 @@ module Revox
1458
1466
  # @return [Array<Symbol>]
1459
1467
  end
1460
1468
 
1469
+ class TransferDestination < Revox::Internal::Type::BaseModel
1470
+ # @!attribute label
1471
+ #
1472
+ # @return [String]
1473
+ required :label, String
1474
+
1475
+ # @!attribute phone_number
1476
+ #
1477
+ # @return [String]
1478
+ required :phone_number, String
1479
+
1480
+ # @!method initialize(label:, phone_number:)
1481
+ # @param label [String]
1482
+ # @param phone_number [String]
1483
+ end
1484
+
1461
1485
  # @see Revox::Models::PhoneNumberUpdateResponse::PhoneNumber::InboundAssistant#type
1462
1486
  module Type
1463
1487
  extend Revox::Internal::Type::Enum
@@ -1495,7 +1519,7 @@ module Revox
1495
1519
 
1496
1520
  # @!attribute speed
1497
1521
  # The speed of the voice. Range depends on provider: Cartesia 0.6–1.5, ElevenLabs
1498
- # 0.7–1.2. Default is 1.0.
1522
+ # 0.7–1.2, Gradium 0.6–1.5. Default is 1.0.
1499
1523
  #
1500
1524
  # @return [Float, nil]
1501
1525
  optional :speed, Float
@@ -1530,6 +1554,7 @@ module Revox
1530
1554
 
1531
1555
  CARTESIA = :cartesia
1532
1556
  ELEVENLABS = :elevenlabs
1557
+ GRADIUM = :gradium
1533
1558
 
1534
1559
  # @!method self.values
1535
1560
  # @return [Array<Symbol>]
@@ -1645,9 +1670,6 @@ module Revox
1645
1670
  INTERESTED = :interested
1646
1671
  COMPLETED = :completed
1647
1672
  REQUESTED_CALLBACK_LATER = :requested_callback_later
1648
- REQUESTED_CALLBACK_NEW_NUMBER = :requested_callback_new_number
1649
- DO_NOT_CONTACT = :do_not_contact
1650
- AI_AVERSE = :ai_averse
1651
1673
  NONE = :none
1652
1674
 
1653
1675
  # @!method self.values
@@ -120,6 +120,7 @@ module Revox
120
120
 
121
121
  CARTESIA = :cartesia
122
122
  ELEVENLABS = :elevenlabs
123
+ GRADIUM = :gradium
123
124
 
124
125
  # @!method self.values
125
126
  # @return [Array<Symbol>]
@@ -68,6 +68,7 @@ module Revox
68
68
 
69
69
  CARTESIA = :cartesia
70
70
  ELEVENLABS = :elevenlabs
71
+ GRADIUM = :gradium
71
72
 
72
73
  # @!method self.values
73
74
  # @return [Array<Symbol>]
@@ -27,6 +27,7 @@ module Revox
27
27
 
28
28
  CARTESIA = :cartesia
29
29
  ELEVENLABS = :elevenlabs
30
+ GRADIUM = :gradium
30
31
 
31
32
  # @!method self.values
32
33
  # @return [Array<Symbol>]
data/lib/revox/models.rb CHANGED
@@ -79,8 +79,6 @@ module Revox
79
79
 
80
80
  CampaignGetRowsParams = Revox::Models::CampaignGetRowsParams
81
81
 
82
- CampaignLaunchParams = Revox::Models::CampaignLaunchParams
83
-
84
82
  CampaignListParams = Revox::Models::CampaignListParams
85
83
 
86
84
  CampaignPauseParams = Revox::Models::CampaignPauseParams
@@ -12,7 +12,7 @@ module Revox
12
12
  # voice provider and voice ID (Cartesia or ElevenLabs), and end-of-call behavior.
13
13
  # Once created, reference the assistant by its ID when placing calls.
14
14
  #
15
- # @overload create(name:, prompt:, after_call_sms_outcomes: nil, after_call_sms_prompt: nil, background_sound: nil, background_sound_volume: nil, calendly: nil, call_retry_config: nil, cartesia_dictionary_pronunciation_id: nil, custom_tools: nil, email_notification_address: nil, email_notification_language: nil, email_notification_outcomes: nil, end_of_call_sentence: nil, faq_items: nil, first_sentence: nil, first_sentence_delay_ms: nil, first_sentence_mode: nil, from_phone_number: nil, human_transfer_mode: nil, ivr_navigation_enabled: nil, llm_model: nil, logo_url: nil, max_call_duration_secs: nil, max_duration_end_message: nil, position: nil, prompt_flow: nil, slack: nil, sms_enabled: nil, sms_template: nil, structured_output_config: nil, structured_output_prompt: nil, stt_context: nil, stt_model: nil, thinking_sound: nil, thinking_sound_probability: nil, thinking_sound_volume: nil, transfer_phone_number: nil, type: nil, voice: nil, voicemail_message: nil, voicemail_sms_prompt: nil, warm_transfer_summary_instructions: nil, webhook_url: nil, zoho: nil, request_options: {})
15
+ # @overload create(name:, prompt:, after_call_sms_outcomes: nil, after_call_sms_prompt: nil, background_sound: nil, background_sound_volume: nil, calendly: nil, call_retry_config: nil, cartesia_dictionary_pronunciation_id: nil, custom_tools: nil, email_notification_address: nil, email_notification_outcomes: nil, end_of_call_sentence: nil, faq_items: nil, first_sentence: nil, first_sentence_delay_ms: nil, first_sentence_mode: nil, from_phone_number: nil, human_transfer_mode: nil, ivr_navigation_enabled: nil, llm_model: nil, logo_url: nil, max_call_duration_secs: nil, max_duration_end_message: nil, position: nil, precall_lookup_url: nil, prompt_flow: nil, slack: nil, sms_enabled: nil, sms_template: nil, structured_output_config: nil, structured_output_prompt: nil, stt_context: nil, stt_model: nil, thinking_sound: nil, thinking_sound_probability: nil, thinking_sound_volume: nil, transfer_destinations: nil, type: nil, voice: nil, voicemail_message: nil, voicemail_sms_prompt: nil, warm_transfer_summary_instructions: nil, webhook_url: nil, zoho: nil, request_options: {})
16
16
  #
17
17
  # @param name [String]
18
18
  #
@@ -36,8 +36,6 @@ module Revox
36
36
  #
37
37
  # @param email_notification_address [String, nil] Email address(es) to receive notifications when a call ends with a matching outc
38
38
  #
39
- # @param email_notification_language [Symbol, Revox::Models::AssistantCreateParams::EmailNotificationLanguage] The language used for the notification email content. One of "en" or "fr". Defau
40
- #
41
39
  # @param email_notification_outcomes [Array<Symbol, Revox::Models::AssistantCreateParams::EmailNotificationOutcome>, nil] Which call outcomes trigger an email notification. E.g. ["interested", "complete
42
40
  #
43
41
  # @param end_of_call_sentence [String] Optional message to say when the agent decides to end the call.
@@ -52,7 +50,7 @@ module Revox
52
50
  #
53
51
  # @param from_phone_number [String, nil] Override the default outbound phone number for calls placed with this assistant.
54
52
  #
55
- # @param human_transfer_mode [Symbol, Revox::Models::AssistantCreateParams::HumanTransferMode, nil] When transfer_phone_number is set: "warm" (AI bridges) or "cold" (SIP REFER; tru
53
+ # @param human_transfer_mode [Symbol, Revox::Models::AssistantCreateParams::HumanTransferMode, nil] When transfer_destinations is non-empty: "warm" (AI bridges) or "cold" (SIP REFE
56
54
  #
57
55
  # @param ivr_navigation_enabled [Boolean] Enable IVR navigation tools. When enabled, the assistant can send DTMF tones and
58
56
  #
@@ -66,6 +64,8 @@ module Revox
66
64
  #
67
65
  # @param position [Revox::Models::AssistantCreateParams::Position, nil] Canvas position of this assistant's node in its multi-step flow editor.
68
66
  #
67
+ # @param precall_lookup_url [String, nil] Inbound calls only. URL fetched over HTTP GET right before the call is answered,
68
+ #
69
69
  # @param prompt_flow [Revox::Models::AssistantCreateParams::PromptFlow, nil] Visual prompt constructor data (nodes, edges, positions). Used by the UI to re-o
70
70
  #
71
71
  # @param slack [Revox::Models::AssistantCreateParams::Slack, nil] Slack notification config. When set, posts a message to the chosen channel after
@@ -88,7 +88,7 @@ module Revox
88
88
  #
89
89
  # @param thinking_sound_volume [Float] Volume of the thinking sound (0 = silent, 1 = max).
90
90
  #
91
- # @param transfer_phone_number [String, nil] Phone number to transfer calls to when users request to speak to a human agent i
91
+ # @param transfer_destinations [Array<Revox::Models::AssistantCreateParams::TransferDestination>, nil] Where calls can be transferred to when users ask to speak to a human. With a sin
92
92
  #
93
93
  # @param type [Symbol, Revox::Models::AssistantCreateParams::Type] Assistant kind. 'standalone' (default) is a normal assistant, 'multi-step' orche
94
94
  #
@@ -150,7 +150,7 @@ module Revox
150
150
  # the prompt, voice, first sentence, name, or any other assistant property without
151
151
  # affecting the rest of the configuration.
152
152
  #
153
- # @overload update(id, after_call_sms_outcomes: nil, after_call_sms_prompt: nil, background_sound: nil, background_sound_volume: nil, calendly: nil, call_retry_config: nil, cartesia_dictionary_pronunciation_id: nil, custom_tools: nil, email_notification_address: nil, email_notification_language: nil, email_notification_outcomes: nil, end_of_call_sentence: nil, faq_items: nil, first_sentence: nil, first_sentence_delay_ms: nil, first_sentence_mode: nil, from_phone_number: nil, human_transfer_mode: nil, ivr_navigation_enabled: nil, llm_model: nil, logo_url: nil, max_call_duration_secs: nil, max_duration_end_message: nil, name: nil, position: nil, prompt: nil, prompt_flow: nil, slack: nil, sms_enabled: nil, sms_template: nil, structured_output_config: nil, structured_output_prompt: nil, stt_context: nil, stt_model: nil, thinking_sound: nil, thinking_sound_probability: nil, thinking_sound_volume: nil, transfer_phone_number: nil, type: nil, voice: nil, voicemail_message: nil, voicemail_sms_prompt: nil, warm_transfer_summary_instructions: nil, webhook_url: nil, zoho: nil, request_options: {})
153
+ # @overload update(id, after_call_sms_outcomes: nil, after_call_sms_prompt: nil, background_sound: nil, background_sound_volume: nil, calendly: nil, call_retry_config: nil, cartesia_dictionary_pronunciation_id: nil, custom_tools: nil, email_notification_address: nil, email_notification_outcomes: nil, end_of_call_sentence: nil, faq_items: nil, first_sentence: nil, first_sentence_delay_ms: nil, first_sentence_mode: nil, from_phone_number: nil, human_transfer_mode: nil, ivr_navigation_enabled: nil, llm_model: nil, logo_url: nil, max_call_duration_secs: nil, max_duration_end_message: nil, name: nil, position: nil, precall_lookup_url: nil, prompt: nil, prompt_flow: nil, slack: nil, sms_enabled: nil, sms_template: nil, structured_output_config: nil, structured_output_prompt: nil, stt_context: nil, stt_model: nil, thinking_sound: nil, thinking_sound_probability: nil, thinking_sound_volume: nil, transfer_destinations: nil, type: nil, voice: nil, voicemail_message: nil, voicemail_sms_prompt: nil, warm_transfer_summary_instructions: nil, webhook_url: nil, zoho: nil, request_options: {})
154
154
  #
155
155
  # @param id [String]
156
156
  #
@@ -172,8 +172,6 @@ module Revox
172
172
  #
173
173
  # @param email_notification_address [String, nil] Email address(es) to receive notifications when a call ends with a matching outc
174
174
  #
175
- # @param email_notification_language [Symbol, Revox::Models::AssistantUpdateParams::EmailNotificationLanguage] The language used for the notification email content. One of "en" or "fr". Defau
176
- #
177
175
  # @param email_notification_outcomes [Array<Symbol, Revox::Models::AssistantUpdateParams::EmailNotificationOutcome>, nil] Which call outcomes trigger an email notification. E.g. ["interested", "complete
178
176
  #
179
177
  # @param end_of_call_sentence [String] Optional message to say when the agent decides to end the call.
@@ -188,7 +186,7 @@ module Revox
188
186
  #
189
187
  # @param from_phone_number [String, nil] Override the default outbound phone number for calls placed with this assistant.
190
188
  #
191
- # @param human_transfer_mode [Symbol, Revox::Models::AssistantUpdateParams::HumanTransferMode, nil] When transfer_phone_number is set: "warm" (AI bridges) or "cold" (SIP REFER; tru
189
+ # @param human_transfer_mode [Symbol, Revox::Models::AssistantUpdateParams::HumanTransferMode, nil] When transfer_destinations is non-empty: "warm" (AI bridges) or "cold" (SIP REFE
192
190
  #
193
191
  # @param ivr_navigation_enabled [Boolean] Enable IVR navigation tools. When enabled, the assistant can send DTMF tones and
194
192
  #
@@ -204,6 +202,8 @@ module Revox
204
202
  #
205
203
  # @param position [Revox::Models::AssistantUpdateParams::Position, nil] Canvas position of this assistant's node in its multi-step flow editor.
206
204
  #
205
+ # @param precall_lookup_url [String, nil] Inbound calls only. URL fetched over HTTP GET right before the call is answered,
206
+ #
207
207
  # @param prompt [String] The prompt to use for the call. This will be given to the LLM (gpt-4.1)
208
208
  #
209
209
  # @param prompt_flow [Revox::Models::AssistantUpdateParams::PromptFlow, nil] Visual prompt constructor data (nodes, edges, positions). Used by the UI to re-o
@@ -228,7 +228,7 @@ module Revox
228
228
  #
229
229
  # @param thinking_sound_volume [Float] Volume of the thinking sound (0 = silent, 1 = max).
230
230
  #
231
- # @param transfer_phone_number [String, nil] Phone number to transfer calls to when users request to speak to a human agent i
231
+ # @param transfer_destinations [Array<Revox::Models::AssistantUpdateParams::TransferDestination>, nil] Where calls can be transferred to when users ask to speak to a human. With a sin
232
232
  #
233
233
  # @param type [Symbol, Revox::Models::AssistantUpdateParams::Type] Assistant kind. 'standalone' (default) is a normal assistant, 'multi-step' orche
234
234
  #
@@ -13,7 +13,7 @@ module Revox
13
13
  # detected. You can also set concurrency limits and pass prompt variables for
14
14
  # dynamic personalization.
15
15
  #
16
- # @overload create(phone_number:, assistant: nil, assistant_id: nil, concurrency: nil, force_now: nil, from_phone_number: nil, metadata: nil, prompt_variables: nil, scheduled_at: nil, request_options: {})
16
+ # @overload create(phone_number:, assistant: nil, assistant_id: nil, concurrency: nil, from_phone_number: nil, metadata: nil, prompt_variables: nil, scheduled_at: nil, skip_calling_window: nil, request_options: {})
17
17
  #
18
18
  # @param phone_number [String] The phone number to call in the E.164 format. Example: +1234567890
19
19
  #
@@ -21,9 +21,7 @@ module Revox
21
21
  #
22
22
  # @param assistant_id [String] The ID of the assistant to use for this call.
23
23
  #
24
- # @param concurrency [Revox::Models::CallCreateParams::Concurrency] Limit the number of concurrent calls for a given concurrency key.
25
- #
26
- # @param force_now [Boolean] The prompt to use for the call. This will be given to the LLM (gpt-4.1)
24
+ # @param concurrency [Revox::Models::CallCreateParams::Concurrency] Limit the number of concurrent calls for a given concurrency key. The limit itse
27
25
  #
28
26
  # @param from_phone_number [String] The phone number to use for making the call (e.g., +1234567890). If not provided
29
27
  #
@@ -33,6 +31,8 @@ module Revox
33
31
  #
34
32
  # @param scheduled_at [Time, Object] Schedule the call to start at a specific date and time (ISO 8601 format). If not
35
33
  #
34
+ # @param skip_calling_window [Boolean] Bypass the calling-window check for this call so it dials even outside the assis
35
+ #
36
36
  # @param request_options [Revox::RequestOptions, Hash{Symbol=>Object}, nil]
37
37
  #
38
38
  # @return [Revox::Models::CallCreateResponse]
@@ -6,29 +6,24 @@ module Revox
6
6
  # Some parameter documentations has been truncated, see
7
7
  # {Revox::Models::CampaignCreateParams} for more details.
8
8
  #
9
- # Create a new outbound calling campaign. By default the campaign launches
10
- # immediately. Set launch to false to save as a draft for later review.
9
+ # Create a new outbound calling campaign. Every contact is materialized as a call
10
+ # in the `not_launched` status nothing is dialed. Use POST
11
+ # /campaigns/:id/launch-calls to send them.
11
12
  #
12
- # @overload create(assistant_id:, contacts:, launch:, name:, type:, call_retry_config: nil, from_phone_number: nil, max_concurrent_calls: nil, scheduled_at: nil, request_options: {})
13
+ # @overload create(assistant_id:, contacts:, name:, call_retry_config: nil, from_phone_number: nil, max_concurrent_calls: nil, request_options: {})
13
14
  #
14
15
  # @param assistant_id [String] The ID of the assistant to use
15
16
  #
16
17
  # @param contacts [Array<Revox::Models::CampaignCreateParams::Contact>] The list of contacts to call
17
18
  #
18
- # @param launch [Boolean] Whether to launch the campaign immediately. Set to false to save as a draft.
19
- #
20
19
  # @param name [String] The name of the campaign
21
20
  #
22
- # @param type [Symbol, Revox::Models::CampaignCreateParams::Type] Campaign type. 'jump_in' campaigns only dial while someone is on the campaign pa
23
- #
24
21
  # @param call_retry_config [Revox::Models::CampaignCreateParams::CallRetryConfig] Override retry configuration for calls in this campaign. If not provided, uses t
25
22
  #
26
23
  # @param from_phone_number [String] The phone number to use for outbound calls (E.164 format, e.g., +1234567890)
27
24
  #
28
25
  # @param max_concurrent_calls [Float] Maximum number of concurrent calls allowed for this campaign
29
26
  #
30
- # @param scheduled_at [Time, Object] Schedule all calls in this campaign to start at a specific date and time (ISO 86
31
- #
32
27
  # @param request_options [Revox::RequestOptions, Hash{Symbol=>Object}, nil]
33
28
  #
34
29
  # @return [Revox::Models::CampaignCreateResponse]
@@ -68,30 +63,24 @@ module Revox
68
63
  # Some parameter documentations has been truncated, see
69
64
  # {Revox::Models::CampaignUpdateParams} for more details.
70
65
  #
71
- # Update editable fields on a campaign. Draft campaigns support updating all
72
- # fields including assistant, contacts, and settings. Non-draft campaigns only
73
- # support renaming.
66
+ # Update a campaign's name, outbound number, retry configuration (calling hours,
67
+ # retry delay, max attempts) and concurrency cap. Changes are applied to the
68
+ # campaign's calls that have not completed yet. The assistant is fixed at
69
+ # creation; add contacts with POST /campaigns/:id/rows, and choose when calls go
70
+ # out with POST /campaigns/:id/launch-calls.
74
71
  #
75
- # @overload update(id, assistant_id: nil, call_retry_config: nil, contacts: nil, from_phone_number: nil, max_concurrent_calls: nil, name: nil, scheduled_at: nil, type: nil, request_options: {})
72
+ # @overload update(id, call_retry_config: nil, from_phone_number: nil, max_concurrent_calls: nil, name: nil, request_options: {})
76
73
  #
77
74
  # @param id [String]
78
75
  #
79
- # @param assistant_id [String] The ID of the assistant to use (draft only)
80
- #
81
76
  # @param call_retry_config [Revox::Models::CampaignUpdateParams::CallRetryConfig, nil] Configuration for call retry behavior including time windows, delays, and max it
82
77
  #
83
- # @param contacts [Array<Revox::Models::CampaignUpdateParams::Contact>] Replace contact list (draft only)
84
- #
85
- # @param from_phone_number [String, nil] The phone number to use for outbound calls (draft only)
78
+ # @param from_phone_number [String, nil] The phone number to use for outbound calls. Editable after launch; applied to th
86
79
  #
87
- # @param max_concurrent_calls [Float, nil] Maximum concurrent calls (draft only)
80
+ # @param max_concurrent_calls [Float, nil] Maximum concurrent calls. Editable after launch.
88
81
  #
89
82
  # @param name [String] Campaign display name
90
83
  #
91
- # @param scheduled_at [Time, Object, nil] Scheduled start time (draft only)
92
- #
93
- # @param type [Symbol, Revox::Models::CampaignUpdateParams::Type] Campaign type (draft only)
94
- #
95
84
  # @param request_options [Revox::RequestOptions, Hash{Symbol=>Object}, nil]
96
85
  #
97
86
  # @return [Revox::Models::CampaignUpdateResponse]
@@ -188,8 +177,7 @@ module Revox
188
177
  )
189
178
  end
190
179
 
191
- # Retrieve all contact rows for a campaign. Useful for loading draft campaign data
192
- # for editing.
180
+ # Retrieve all contact rows for a campaign.
193
181
  #
194
182
  # @overload get_rows(id, request_options: {})
195
183
  #
@@ -208,26 +196,6 @@ module Revox
208
196
  )
209
197
  end
210
198
 
211
- # Launch a previously saved draft campaign. This starts all calls immediately (or
212
- # queues them if scheduled_at is set). The campaign must be in draft status.
213
- #
214
- # @overload launch(id, request_options: {})
215
- #
216
- # @param id [String]
217
- # @param request_options [Revox::RequestOptions, Hash{Symbol=>Object}, nil]
218
- #
219
- # @return [Revox::Models::CampaignLaunchResponse]
220
- #
221
- # @see Revox::Models::CampaignLaunchParams
222
- def launch(id, params = {})
223
- @client.request(
224
- method: :post,
225
- path: ["campaigns/%1$s/launch", id],
226
- model: Revox::Models::CampaignLaunchResponse,
227
- options: params[:request_options]
228
- )
229
- end
230
-
231
199
  # Pause a running campaign so no further calls are placed. In-progress calls are
232
200
  # allowed to finish; pending and scheduled calls are held until the campaign is
233
201
  # resumed. Scheduled retry timers keep counting down, so a call resumed before its
data/lib/revox/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Revox
4
- VERSION = "0.3.0"
4
+ VERSION = "0.4.0"
5
5
  end
data/lib/revox.rb CHANGED
@@ -92,8 +92,6 @@ require_relative "revox/models/campaign_export_rows_params"
92
92
  require_relative "revox/models/campaign_export_rows_response"
93
93
  require_relative "revox/models/campaign_get_rows_params"
94
94
  require_relative "revox/models/campaign_get_rows_response"
95
- require_relative "revox/models/campaign_launch_params"
96
- require_relative "revox/models/campaign_launch_response"
97
95
  require_relative "revox/models/campaign_list_params"
98
96
  require_relative "revox/models/campaign_list_response"
99
97
  require_relative "revox/models/campaign_pause_params"