revox 0.3.0 → 0.5.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 (101) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +33 -0
  3. data/README.md +40 -40
  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_launch_params.rb +182 -1
  22. data/lib/revox/models/campaign_launch_response.rb +3447 -1574
  23. data/lib/revox/models/campaign_list_response.rb +108 -119
  24. data/lib/revox/models/campaign_retrieve_response.rb +108 -119
  25. data/lib/revox/models/campaign_statistics_response.rb +51 -23
  26. data/lib/revox/models/campaign_update_params.rb +9 -78
  27. data/lib/revox/models/campaign_update_response.rb +108 -119
  28. data/lib/revox/models/phone_number_list_response.rb +87 -65
  29. data/lib/revox/models/phone_number_update_response.rb +87 -65
  30. data/lib/revox/models/voice_list_response.rb +1 -0
  31. data/lib/revox/models/voice_preview_params.rb +1 -0
  32. data/lib/revox/models/voice_retrieve_params.rb +1 -0
  33. data/lib/revox/resources/assistants.rb +10 -10
  34. data/lib/revox/resources/call.rb +4 -4
  35. data/lib/revox/resources/campaigns.rb +35 -31
  36. data/lib/revox/version.rb +1 -1
  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_launch_params.rbi +511 -2
  55. data/rbi/revox/models/campaign_launch_response.rbi +6882 -3163
  56. data/rbi/revox/models/campaign_list_response.rbi +188 -262
  57. data/rbi/revox/models/campaign_retrieve_response.rbi +188 -266
  58. data/rbi/revox/models/campaign_statistics_response.rbi +94 -36
  59. data/rbi/revox/models/campaign_update_params.rbi +10 -128
  60. data/rbi/revox/models/campaign_update_response.rbi +188 -266
  61. data/rbi/revox/models/phone_number_list_response.rbi +157 -147
  62. data/rbi/revox/models/phone_number_update_response.rbi +157 -147
  63. data/rbi/revox/models/voice_list_response.rbi +5 -0
  64. data/rbi/revox/models/voice_preview_params.rbi +2 -0
  65. data/rbi/revox/models/voice_retrieve_params.rbi +2 -0
  66. data/rbi/revox/resources/assistants.rbi +40 -22
  67. data/rbi/revox/resources/call.rbi +7 -4
  68. data/rbi/revox/resources/campaigns.rbi +30 -36
  69. data/sig/revox/models/assistant_clone_response.rbs +46 -54
  70. data/sig/revox/models/assistant_create_params.rbs +39 -58
  71. data/sig/revox/models/assistant_create_response.rbs +46 -54
  72. data/sig/revox/models/assistant_list_response.rbs +46 -54
  73. data/sig/revox/models/assistant_retrieve_response.rbs +46 -54
  74. data/sig/revox/models/assistant_update_params.rbs +39 -58
  75. data/sig/revox/models/assistant_update_response.rbs +46 -54
  76. data/sig/revox/models/call_create_params.rbs +50 -71
  77. data/sig/revox/models/call_create_response.rbs +468 -77
  78. data/sig/revox/models/call_export_params.rbs +2 -6
  79. data/sig/revox/models/call_phone_history_response.rbs +1 -10
  80. data/sig/revox/models/call_retrieve_response.rbs +468 -77
  81. data/sig/revox/models/call_search_params.rbs +2 -6
  82. data/sig/revox/models/call_search_response.rbs +468 -77
  83. data/sig/revox/models/campaign_create_params.rbs +5 -50
  84. data/sig/revox/models/campaign_create_response.rbs +62 -98
  85. data/sig/revox/models/campaign_get_rows_response.rbs +467 -73
  86. data/sig/revox/models/campaign_launch_params.rbs +215 -2
  87. data/sig/revox/models/campaign_launch_response.rbs +2721 -1219
  88. data/sig/revox/models/campaign_list_response.rbs +62 -98
  89. data/sig/revox/models/campaign_retrieve_response.rbs +62 -98
  90. data/sig/revox/models/campaign_statistics_response.rbs +55 -24
  91. data/sig/revox/models/campaign_update_params.rbs +1 -69
  92. data/sig/revox/models/campaign_update_response.rbs +62 -98
  93. data/sig/revox/models/phone_number_list_response.rbs +46 -54
  94. data/sig/revox/models/phone_number_update_response.rbs +46 -54
  95. data/sig/revox/models/voice_list_response.rbs +2 -1
  96. data/sig/revox/models/voice_preview_params.rbs +2 -1
  97. data/sig/revox/models/voice_retrieve_params.rbs +2 -1
  98. data/sig/revox/resources/assistants.rbs +4 -4
  99. data/sig/revox/resources/call.rbs +1 -1
  100. data/sig/revox/resources/campaigns.rbs +3 -7
  101. metadata +2 -2
@@ -83,14 +83,6 @@ module Revox
83
83
  # @return [String, nil]
84
84
  optional :email_notification_address, String, nil?: true
85
85
 
86
- # @!attribute email_notification_language
87
- # The language used for the notification email content. One of "en" or "fr".
88
- # Defaults to "en".
89
- #
90
- # @return [Symbol, Revox::Models::AssistantCreateParams::EmailNotificationLanguage, nil]
91
- optional :email_notification_language,
92
- enum: -> { Revox::AssistantCreateParams::EmailNotificationLanguage }
93
-
94
86
  # @!attribute email_notification_outcomes
95
87
  # Which call outcomes trigger an email notification. E.g. ["interested",
96
88
  # "completed", "none"]. Use "none" when outcome is null.
@@ -145,8 +137,8 @@ module Revox
145
137
  optional :from_phone_number, String, nil?: true
146
138
 
147
139
  # @!attribute human_transfer_mode
148
- # When transfer_phone_number is set: "warm" (AI bridges) or "cold" (SIP REFER;
149
- # trunk must allow REFER/PSTN). Omit or null when transfer is disabled.
140
+ # When transfer_destinations is non-empty: "warm" (AI bridges) or "cold" (SIP
141
+ # REFER; trunk must allow REFER/PSTN). Omit or null when transfer is disabled.
150
142
  #
151
143
  # @return [Symbol, Revox::Models::AssistantCreateParams::HumanTransferMode, nil]
152
144
  optional :human_transfer_mode, enum: -> { Revox::AssistantCreateParams::HumanTransferMode }, nil?: true
@@ -191,6 +183,16 @@ module Revox
191
183
  # @return [Revox::Models::AssistantCreateParams::Position, nil]
192
184
  optional :position, -> { Revox::AssistantCreateParams::Position }, nil?: true
193
185
 
186
+ # @!attribute precall_lookup_url
187
+ # Inbound calls only. URL fetched over HTTP GET right before the call is answered,
188
+ # with `{{phone}}` replaced by the caller's number in E.164 format (URL-encoded).
189
+ # It must return `{"prompt_variables": {...}}` covering every `{{variable}}` the
190
+ # assistant declares, otherwise the call is errored. Must be an http(s) URL
191
+ # containing `{{phone}}`. When null, no lookup is performed.
192
+ #
193
+ # @return [String, nil]
194
+ optional :precall_lookup_url, String, nil?: true
195
+
194
196
  # @!attribute prompt_flow
195
197
  # Visual prompt constructor data (nodes, edges, positions). Used by the UI to
196
198
  # re-open the visual editor. Does not affect call behavior — the flattened prompt
@@ -272,12 +274,16 @@ module Revox
272
274
  # @return [Float, nil]
273
275
  optional :thinking_sound_volume, Float
274
276
 
275
- # @!attribute transfer_phone_number
276
- # Phone number to transfer calls to when users request to speak to a human agent
277
- # in E.164 format (e.g. +1234567890).
277
+ # @!attribute transfer_destinations
278
+ # Where calls can be transferred to when users ask to speak to a human. With a
279
+ # single entry the assistant always transfers there; with several, it picks one at
280
+ # transfer time by applying the routing rules written in the assistant's own
281
+ # prompt (which refer to the destination labels). Empty or null disables transfer.
278
282
  #
279
- # @return [String, nil]
280
- optional :transfer_phone_number, String, nil?: true
283
+ # @return [Array<Revox::Models::AssistantCreateParams::TransferDestination>, nil]
284
+ optional :transfer_destinations,
285
+ -> { Revox::Internal::Type::ArrayOf[Revox::AssistantCreateParams::TransferDestination] },
286
+ nil?: true
281
287
 
282
288
  # @!attribute type
283
289
  # Assistant kind. 'standalone' (default) is a normal assistant, 'multi-step'
@@ -331,7 +337,7 @@ module Revox
331
337
  # @return [Revox::Models::AssistantCreateParams::Zoho, nil]
332
338
  optional :zoho, -> { Revox::AssistantCreateParams::Zoho }, nil?: true
333
339
 
334
- # @!method initialize(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: {})
340
+ # @!method initialize(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: {})
335
341
  # Some parameter documentations has been truncated, see
336
342
  # {Revox::Models::AssistantCreateParams} for more details.
337
343
  #
@@ -357,8 +363,6 @@ module Revox
357
363
  #
358
364
  # @param email_notification_address [String, nil] Email address(es) to receive notifications when a call ends with a matching outc
359
365
  #
360
- # @param email_notification_language [Symbol, Revox::Models::AssistantCreateParams::EmailNotificationLanguage] The language used for the notification email content. One of "en" or "fr". Defau
361
- #
362
366
  # @param email_notification_outcomes [Array<Symbol, Revox::Models::AssistantCreateParams::EmailNotificationOutcome>, nil] Which call outcomes trigger an email notification. E.g. ["interested", "complete
363
367
  #
364
368
  # @param end_of_call_sentence [String] Optional message to say when the agent decides to end the call.
@@ -373,7 +377,7 @@ module Revox
373
377
  #
374
378
  # @param from_phone_number [String, nil] Override the default outbound phone number for calls placed with this assistant.
375
379
  #
376
- # @param human_transfer_mode [Symbol, Revox::Models::AssistantCreateParams::HumanTransferMode, nil] When transfer_phone_number is set: "warm" (AI bridges) or "cold" (SIP REFER; tru
380
+ # @param human_transfer_mode [Symbol, Revox::Models::AssistantCreateParams::HumanTransferMode, nil] When transfer_destinations is non-empty: "warm" (AI bridges) or "cold" (SIP REFE
377
381
  #
378
382
  # @param ivr_navigation_enabled [Boolean] Enable IVR navigation tools. When enabled, the assistant can send DTMF tones and
379
383
  #
@@ -387,6 +391,8 @@ module Revox
387
391
  #
388
392
  # @param position [Revox::Models::AssistantCreateParams::Position, nil] Canvas position of this assistant's node in its multi-step flow editor.
389
393
  #
394
+ # @param precall_lookup_url [String, nil] Inbound calls only. URL fetched over HTTP GET right before the call is answered,
395
+ #
390
396
  # @param prompt_flow [Revox::Models::AssistantCreateParams::PromptFlow, nil] Visual prompt constructor data (nodes, edges, positions). Used by the UI to re-o
391
397
  #
392
398
  # @param slack [Revox::Models::AssistantCreateParams::Slack, nil] Slack notification config. When set, posts a message to the chosen channel after
@@ -409,7 +415,7 @@ module Revox
409
415
  #
410
416
  # @param thinking_sound_volume [Float] Volume of the thinking sound (0 = silent, 1 = max).
411
417
  #
412
- # @param transfer_phone_number [String, nil] Phone number to transfer calls to when users request to speak to a human agent i
418
+ # @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
413
419
  #
414
420
  # @param type [Symbol, Revox::Models::AssistantCreateParams::Type] Assistant kind. 'standalone' (default) is a normal assistant, 'multi-step' orche
415
421
  #
@@ -434,9 +440,6 @@ module Revox
434
440
  INTERESTED = :interested
435
441
  COMPLETED = :completed
436
442
  REQUESTED_CALLBACK_LATER = :requested_callback_later
437
- REQUESTED_CALLBACK_NEW_NUMBER = :requested_callback_new_number
438
- DO_NOT_CONTACT = :do_not_contact
439
- AI_AVERSE = :ai_averse
440
443
  NONE = :none
441
444
 
442
445
  # @!method self.values
@@ -564,7 +567,8 @@ module Revox
564
567
  required :calling_window_start_time, String
565
568
 
566
569
  # @!attribute retry_delay_seconds
567
- # Delay between retry attempts in seconds. Default: 7200 (2 hours).
570
+ # Delay between retry attempts in seconds. 0 retries as soon as the calling window
571
+ # allows. Default: 7200 (2 hours).
568
572
  #
569
573
  # @return [Integer]
570
574
  required :retry_delay_seconds, Integer
@@ -578,7 +582,7 @@ module Revox
578
582
  #
579
583
  # @param calling_window_start_time [String] Start time for the calling window in the recipient's timezone (or timezone_overr
580
584
  #
581
- # @param retry_delay_seconds [Integer] Delay between retry attempts in seconds. Default: 7200 (2 hours).
585
+ # @param retry_delay_seconds [Integer] Delay between retry attempts in seconds. 0 retries as soon as the calling window
582
586
  end
583
587
  end
584
588
 
@@ -756,18 +760,6 @@ module Revox
756
760
  end
757
761
  end
758
762
 
759
- # The language used for the notification email content. One of "en" or "fr".
760
- # Defaults to "en".
761
- module EmailNotificationLanguage
762
- extend Revox::Internal::Type::Enum
763
-
764
- EN = :en
765
- FR = :fr
766
-
767
- # @!method self.values
768
- # @return [Array<Symbol>]
769
- end
770
-
771
763
  module EmailNotificationOutcome
772
764
  extend Revox::Internal::Type::Enum
773
765
 
@@ -775,9 +767,6 @@ module Revox
775
767
  INTERESTED = :interested
776
768
  COMPLETED = :completed
777
769
  REQUESTED_CALLBACK_LATER = :requested_callback_later
778
- REQUESTED_CALLBACK_NEW_NUMBER = :requested_callback_new_number
779
- DO_NOT_CONTACT = :do_not_contact
780
- AI_AVERSE = :ai_averse
781
770
  NONE = :none
782
771
 
783
772
  # @!method self.values
@@ -815,8 +804,8 @@ module Revox
815
804
  # @return [Array<Symbol>]
816
805
  end
817
806
 
818
- # When transfer_phone_number is set: "warm" (AI bridges) or "cold" (SIP REFER;
819
- # trunk must allow REFER/PSTN). Omit or null when transfer is disabled.
807
+ # When transfer_destinations is non-empty: "warm" (AI bridges) or "cold" (SIP
808
+ # REFER; trunk must allow REFER/PSTN). Omit or null when transfer is disabled.
820
809
  module HumanTransferMode
821
810
  extend Revox::Internal::Type::Enum
822
811
 
@@ -1102,11 +1091,13 @@ module Revox
1102
1091
  end
1103
1092
 
1104
1093
  class Slack < Revox::Internal::Type::BaseModel
1105
- # @!attribute channel_id
1106
- # The Slack channel ID where the notification will be posted.
1094
+ # @!attribute channels
1095
+ # The Slack channels eligible to receive the notification. When more than one is
1096
+ # configured, the agent prompt may define routing rules to narrow it down per
1097
+ # call; with no such rules every channel here is notified.
1107
1098
  #
1108
- # @return [String]
1109
- required :channel_id, String
1099
+ # @return [Array<Revox::Models::AssistantCreateParams::Slack::Channel>]
1100
+ required :channels, -> { Revox::Internal::Type::ArrayOf[Revox::AssistantCreateParams::Slack::Channel] }
1110
1101
 
1111
1102
  # @!attribute connection_id
1112
1103
  # The Nango connection ID linking the org's Slack workspace to Revox.
@@ -1122,40 +1113,55 @@ module Revox
1122
1113
  required :outcomes,
1123
1114
  -> { Revox::Internal::Type::ArrayOf[enum: Revox::AssistantCreateParams::Slack::Outcome] }
1124
1115
 
1125
- # @!attribute channel_name
1126
- # Human-readable Slack channel name, cached for display in the UI.
1127
- #
1128
- # @return [String, nil]
1129
- optional :channel_name, String, nil?: true
1130
-
1131
1116
  # @!attribute template
1132
1117
  # Optional message template. Supports {{summary}}, {{outcome}}, {{phone}},
1133
1118
  # {{call_url}}, {{assistant_name}}, {{campaign_name}}, {{first_name}},
1134
- # {{last_name}}, {{email}}, {{company}}, {{contact_name}}, {{contact_line}}, plus
1135
- # prompt_variables and structured_output keys. When null/empty a default template
1136
- # is used.
1119
+ # {{last_name}}, {{email}}, {{company}}, {{job_title}}, {{contact_name}},
1120
+ # {{contact_line}}, plus prompt_variables and structured_output keys. When
1121
+ # null/empty a default template is used.
1137
1122
  #
1138
1123
  # @return [String, nil]
1139
1124
  optional :template, String, nil?: true
1140
1125
 
1141
- # @!method initialize(channel_id:, connection_id:, outcomes:, channel_name: nil, template: nil)
1126
+ # @!method initialize(channels:, connection_id:, outcomes:, template: nil)
1142
1127
  # Some parameter documentations has been truncated, see
1143
1128
  # {Revox::Models::AssistantCreateParams::Slack} for more details.
1144
1129
  #
1145
1130
  # Slack notification config. When set, posts a message to the chosen channel after
1146
1131
  # a call ends with one of the configured outcomes.
1147
1132
  #
1148
- # @param channel_id [String] The Slack channel ID where the notification will be posted.
1133
+ # @param channels [Array<Revox::Models::AssistantCreateParams::Slack::Channel>] The Slack channels eligible to receive the notification. When more than one is c
1149
1134
  #
1150
1135
  # @param connection_id [String] The Nango connection ID linking the org's Slack workspace to Revox.
1151
1136
  #
1152
1137
  # @param outcomes [Array<Symbol, Revox::Models::AssistantCreateParams::Slack::Outcome>] Which call outcomes trigger a Slack notification (e.g. ['interested', 'none']).
1153
1138
  #
1154
- # @param channel_name [String, nil] Human-readable Slack channel name, cached for display in the UI.
1155
- #
1156
1139
  # @param template [String, nil] Optional message template. Supports {{summary}}, {{outcome}}, {{phone}},
1157
1140
  # {{call\_
1158
1141
 
1142
+ class Channel < Revox::Internal::Type::BaseModel
1143
+ # @!attribute id
1144
+ # The Slack channel ID (e.g. 'C01234567').
1145
+ #
1146
+ # @return [String]
1147
+ required :id, String
1148
+
1149
+ # @!attribute name
1150
+ # Human-readable Slack channel name, cached for display in the UI and given to the
1151
+ # LLM when the agent prompt routes by channel name.
1152
+ #
1153
+ # @return [String, nil]
1154
+ optional :name, String, nil?: true
1155
+
1156
+ # @!method initialize(id:, name: nil)
1157
+ # Some parameter documentations has been truncated, see
1158
+ # {Revox::Models::AssistantCreateParams::Slack::Channel} for more details.
1159
+ #
1160
+ # @param id [String] The Slack channel ID (e.g. 'C01234567').
1161
+ #
1162
+ # @param name [String, nil] Human-readable Slack channel name, cached for display in the UI and given to the
1163
+ end
1164
+
1159
1165
  module Outcome
1160
1166
  extend Revox::Internal::Type::Enum
1161
1167
 
@@ -1163,9 +1169,6 @@ module Revox
1163
1169
  INTERESTED = :interested
1164
1170
  COMPLETED = :completed
1165
1171
  REQUESTED_CALLBACK_LATER = :requested_callback_later
1166
- REQUESTED_CALLBACK_NEW_NUMBER = :requested_callback_new_number
1167
- DO_NOT_CONTACT = :do_not_contact
1168
- AI_AVERSE = :ai_averse
1169
1172
  NONE = :none
1170
1173
 
1171
1174
  # @!method self.values
@@ -1288,6 +1291,29 @@ module Revox
1288
1291
  # @return [Array<Symbol>]
1289
1292
  end
1290
1293
 
1294
+ class TransferDestination < Revox::Internal::Type::BaseModel
1295
+ # @!attribute label
1296
+ # Human-meaningful name for this destination (e.g. "Sales"). The assistant's
1297
+ # prompt refers to these labels when describing who to transfer to.
1298
+ #
1299
+ # @return [String]
1300
+ required :label, String
1301
+
1302
+ # @!attribute phone_number
1303
+ # Destination phone number in E.164 format (e.g. +1234567890).
1304
+ #
1305
+ # @return [String]
1306
+ required :phone_number, String
1307
+
1308
+ # @!method initialize(label:, phone_number:)
1309
+ # Some parameter documentations has been truncated, see
1310
+ # {Revox::Models::AssistantCreateParams::TransferDestination} for more details.
1311
+ #
1312
+ # @param label [String] Human-meaningful name for this destination (e.g. "Sales"). The assistant's promp
1313
+ #
1314
+ # @param phone_number [String] Destination phone number in E.164 format (e.g. +1234567890).
1315
+ end
1316
+
1291
1317
  # Assistant kind. 'standalone' (default) is a normal assistant, 'multi-step'
1292
1318
  # orchestrates a flow of sub-assistants, 'sub-assistant' is a step inside a
1293
1319
  # multi-step flow (hidden from the assistants list). Flow transitions are managed
@@ -1325,7 +1351,7 @@ module Revox
1325
1351
 
1326
1352
  # @!attribute speed
1327
1353
  # The speed of the voice. Range depends on provider: Cartesia 0.6–1.5, ElevenLabs
1328
- # 0.7–1.2. Default is 1.0.
1354
+ # 0.7–1.2, Gradium 0.6–1.5. Default is 1.0.
1329
1355
  #
1330
1356
  # @return [Float, nil]
1331
1357
  optional :speed, Float
@@ -1362,6 +1388,7 @@ module Revox
1362
1388
 
1363
1389
  CARTESIA = :cartesia
1364
1390
  ELEVENLABS = :elevenlabs
1391
+ GRADIUM = :gradium
1365
1392
 
1366
1393
  # @!method self.values
1367
1394
  # @return [Array<Symbol>]
@@ -1478,9 +1505,6 @@ module Revox
1478
1505
  INTERESTED = :interested
1479
1506
  COMPLETED = :completed
1480
1507
  REQUESTED_CALLBACK_LATER = :requested_callback_later
1481
- REQUESTED_CALLBACK_NEW_NUMBER = :requested_callback_new_number
1482
- DO_NOT_CONTACT = :do_not_contact
1483
- AI_AVERSE = :ai_averse
1484
1508
  NONE = :none
1485
1509
 
1486
1510
  # @!method self.values
@@ -89,13 +89,6 @@ module Revox
89
89
  # @return [String, nil]
90
90
  required :email_notification_address, String, nil?: true
91
91
 
92
- # @!attribute email_notification_language
93
- # The language used for the notification email content. One of "en" or "fr".
94
- #
95
- # @return [Symbol, Revox::Models::AssistantCreateResponse::Assistant::EmailNotificationLanguage]
96
- required :email_notification_language,
97
- enum: -> { Revox::Models::AssistantCreateResponse::Assistant::EmailNotificationLanguage }
98
-
99
92
  # @!attribute email_notification_outcomes
100
93
  # Which call outcomes trigger an email notification. E.g. ["interested",
101
94
  # "completed", "none"]. Use "none" when outcome is null.
@@ -135,8 +128,8 @@ module Revox
135
128
  required :from_phone_number, String, nil?: true
136
129
 
137
130
  # @!attribute human_transfer_mode
138
- # Warm or cold transfer when transfer_phone_number is set; null when transfer is
139
- # not configured.
131
+ # Warm or cold transfer when transfer_destinations is non-empty; null when
132
+ # transfer is not configured.
140
133
  #
141
134
  # @return [Symbol, Revox::Models::AssistantCreateResponse::Assistant::HumanTransferMode, nil]
142
135
  required :human_transfer_mode,
@@ -192,6 +185,13 @@ module Revox
192
185
  # @return [Revox::Models::AssistantCreateResponse::Assistant::Position, nil]
193
186
  required :position, -> { Revox::Models::AssistantCreateResponse::Assistant::Position }, nil?: true
194
187
 
188
+ # @!attribute precall_lookup_url
189
+ # URL fetched before an inbound call is answered to resolve the assistant's prompt
190
+ # variables. Null when no lookup is configured.
191
+ #
192
+ # @return [String, nil]
193
+ required :precall_lookup_url, String, nil?: true
194
+
195
195
  # @!attribute prompt
196
196
  #
197
197
  # @return [String]
@@ -275,11 +275,14 @@ module Revox
275
275
  # @return [Float]
276
276
  required :thinking_sound_volume, Float
277
277
 
278
- # @!attribute transfer_phone_number
279
- # Phone number to transfer calls to when users request to speak to a human agent.
278
+ # @!attribute transfer_destinations
279
+ # Where calls can be transferred to when users ask to speak to a human. Null or
280
+ # empty when transfer is not configured.
280
281
  #
281
- # @return [String, nil]
282
- required :transfer_phone_number, String, nil?: true
282
+ # @return [Array<Revox::Models::AssistantCreateResponse::Assistant::TransferDestination>, nil]
283
+ required :transfer_destinations,
284
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::AssistantCreateResponse::Assistant::TransferDestination] },
285
+ nil?: true
283
286
 
284
287
  # @!attribute type
285
288
  #
@@ -340,6 +343,11 @@ module Revox
340
343
  optional :faq_items,
341
344
  -> { Revox::Internal::Type::ArrayOf[Revox::Models::AssistantCreateResponse::Assistant::FaqItem] }
342
345
 
346
+ # @!attribute is_inbound_receptionist
347
+ #
348
+ # @return [Boolean, nil]
349
+ optional :is_inbound_receptionist, Revox::Internal::Type::Boolean
350
+
343
351
  # @!attribute is_realestate_assistant
344
352
  #
345
353
  # @return [Boolean, nil]
@@ -350,7 +358,7 @@ module Revox
350
358
  # @return [Float, nil]
351
359
  optional :pending_faq_count, Float
352
360
 
353
- # @!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)
361
+ # @!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)
354
362
  # Some parameter documentations has been truncated, see
355
363
  # {Revox::Models::AssistantCreateResponse::Assistant} for more details.
356
364
  #
@@ -376,8 +384,6 @@ module Revox
376
384
  #
377
385
  # @param email_notification_address [String, nil] Email address(es) to receive notifications when a call ends with a matching outc
378
386
  #
379
- # @param email_notification_language [Symbol, Revox::Models::AssistantCreateResponse::Assistant::EmailNotificationLanguage] The language used for the notification email content. One of "en" or "fr".
380
- #
381
387
  # @param email_notification_outcomes [Array<Symbol, Revox::Models::AssistantCreateResponse::Assistant::EmailNotificationOutcome>, nil] Which call outcomes trigger an email notification. E.g. ["interested", "complete
382
388
  #
383
389
  # @param end_of_call_sentence [String, nil]
@@ -390,7 +396,7 @@ module Revox
390
396
  #
391
397
  # @param from_phone_number [String, nil] Override the default outbound phone number for calls placed with this assistant.
392
398
  #
393
- # @param human_transfer_mode [Symbol, Revox::Models::AssistantCreateResponse::Assistant::HumanTransferMode, nil] Warm or cold transfer when transfer_phone_number is set; null when transfer is n
399
+ # @param human_transfer_mode [Symbol, Revox::Models::AssistantCreateResponse::Assistant::HumanTransferMode, nil] Warm or cold transfer when transfer_destinations is non-empty; null when transfe
394
400
  #
395
401
  # @param ivr_navigation_enabled [Boolean] Enable IVR navigation tools. When enabled, the assistant can send DTMF tones and
396
402
  #
@@ -408,6 +414,8 @@ module Revox
408
414
  #
409
415
  # @param position [Revox::Models::AssistantCreateResponse::Assistant::Position, nil]
410
416
  #
417
+ # @param precall_lookup_url [String, nil] URL fetched before an inbound call is answered to resolve the assistant's prompt
418
+ #
411
419
  # @param prompt [String]
412
420
  #
413
421
  # @param prompt_flow [Revox::Models::AssistantCreateResponse::Assistant::PromptFlow, nil]
@@ -432,7 +440,7 @@ module Revox
432
440
  #
433
441
  # @param thinking_sound_volume [Float] Volume of the thinking sound (0 = silent, 1 = max).
434
442
  #
435
- # @param transfer_phone_number [String, nil] Phone number to transfer calls to when users request to speak to a human agent.
443
+ # @param transfer_destinations [Array<Revox::Models::AssistantCreateResponse::Assistant::TransferDestination>, nil] Where calls can be transferred to when users ask to speak to a human. Null or em
436
444
  #
437
445
  # @param type [Symbol, Revox::Models::AssistantCreateResponse::Assistant::Type]
438
446
  #
@@ -454,6 +462,8 @@ module Revox
454
462
  #
455
463
  # @param faq_items [Array<Revox::Models::AssistantCreateResponse::Assistant::FaqItem>]
456
464
  #
465
+ # @param is_inbound_receptionist [Boolean]
466
+ #
457
467
  # @param is_realestate_assistant [Boolean]
458
468
  #
459
469
  # @param pending_faq_count [Float]
@@ -465,9 +475,6 @@ module Revox
465
475
  INTERESTED = :interested
466
476
  COMPLETED = :completed
467
477
  REQUESTED_CALLBACK_LATER = :requested_callback_later
468
- REQUESTED_CALLBACK_NEW_NUMBER = :requested_callback_new_number
469
- DO_NOT_CONTACT = :do_not_contact
470
- AI_AVERSE = :ai_averse
471
478
  NONE = :none
472
479
 
473
480
  # @!method self.values
@@ -600,7 +607,8 @@ module Revox
600
607
  required :calling_window_start_time, String
601
608
 
602
609
  # @!attribute retry_delay_seconds
603
- # Delay between retry attempts in seconds. Default: 7200 (2 hours).
610
+ # Delay between retry attempts in seconds. 0 retries as soon as the calling window
611
+ # allows. Default: 7200 (2 hours).
604
612
  #
605
613
  # @return [Integer]
606
614
  required :retry_delay_seconds, Integer
@@ -614,7 +622,7 @@ module Revox
614
622
  #
615
623
  # @param calling_window_start_time [String] Start time for the calling window in the recipient's timezone (or timezone_overr
616
624
  #
617
- # @param retry_delay_seconds [Integer] Delay between retry attempts in seconds. Default: 7200 (2 hours).
625
+ # @param retry_delay_seconds [Integer] Delay between retry attempts in seconds. 0 retries as soon as the calling window
618
626
  end
619
627
  end
620
628
 
@@ -797,19 +805,6 @@ module Revox
797
805
  end
798
806
  end
799
807
 
800
- # The language used for the notification email content. One of "en" or "fr".
801
- #
802
- # @see Revox::Models::AssistantCreateResponse::Assistant#email_notification_language
803
- module EmailNotificationLanguage
804
- extend Revox::Internal::Type::Enum
805
-
806
- EN = :en
807
- FR = :fr
808
-
809
- # @!method self.values
810
- # @return [Array<Symbol>]
811
- end
812
-
813
808
  module EmailNotificationOutcome
814
809
  extend Revox::Internal::Type::Enum
815
810
 
@@ -817,9 +812,6 @@ module Revox
817
812
  INTERESTED = :interested
818
813
  COMPLETED = :completed
819
814
  REQUESTED_CALLBACK_LATER = :requested_callback_later
820
- REQUESTED_CALLBACK_NEW_NUMBER = :requested_callback_new_number
821
- DO_NOT_CONTACT = :do_not_contact
822
- AI_AVERSE = :ai_averse
823
815
  NONE = :none
824
816
 
825
817
  # @!method self.values
@@ -838,8 +830,8 @@ module Revox
838
830
  # @return [Array<Symbol>]
839
831
  end
840
832
 
841
- # Warm or cold transfer when transfer_phone_number is set; null when transfer is
842
- # not configured.
833
+ # Warm or cold transfer when transfer_destinations is non-empty; null when
834
+ # transfer is not configured.
843
835
  #
844
836
  # @see Revox::Models::AssistantCreateResponse::Assistant#human_transfer_mode
845
837
  module HumanTransferMode
@@ -1129,11 +1121,14 @@ module Revox
1129
1121
 
1130
1122
  # @see Revox::Models::AssistantCreateResponse::Assistant#slack
1131
1123
  class Slack < Revox::Internal::Type::BaseModel
1132
- # @!attribute channel_id
1133
- # The Slack channel ID where the notification will be posted.
1124
+ # @!attribute channels
1125
+ # The Slack channels eligible to receive the notification. When more than one is
1126
+ # configured, the agent prompt may define routing rules to narrow it down per
1127
+ # call; with no such rules every channel here is notified.
1134
1128
  #
1135
- # @return [String]
1136
- required :channel_id, String
1129
+ # @return [Array<Revox::Models::AssistantCreateResponse::Assistant::Slack::Channel>]
1130
+ required :channels,
1131
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::AssistantCreateResponse::Assistant::Slack::Channel] }
1137
1132
 
1138
1133
  # @!attribute connection_id
1139
1134
  # The Nango connection ID linking the org's Slack workspace to Revox.
@@ -1149,37 +1144,53 @@ module Revox
1149
1144
  required :outcomes,
1150
1145
  -> { Revox::Internal::Type::ArrayOf[enum: Revox::Models::AssistantCreateResponse::Assistant::Slack::Outcome] }
1151
1146
 
1152
- # @!attribute channel_name
1153
- # Human-readable Slack channel name, cached for display in the UI.
1154
- #
1155
- # @return [String, nil]
1156
- optional :channel_name, String, nil?: true
1157
-
1158
1147
  # @!attribute template
1159
1148
  # Optional message template. Supports {{summary}}, {{outcome}}, {{phone}},
1160
1149
  # {{call_url}}, {{assistant_name}}, {{campaign_name}}, {{first_name}},
1161
- # {{last_name}}, {{email}}, {{company}}, {{contact_name}}, {{contact_line}}, plus
1162
- # prompt_variables and structured_output keys. When null/empty a default template
1163
- # is used.
1150
+ # {{last_name}}, {{email}}, {{company}}, {{job_title}}, {{contact_name}},
1151
+ # {{contact_line}}, plus prompt_variables and structured_output keys. When
1152
+ # null/empty a default template is used.
1164
1153
  #
1165
1154
  # @return [String, nil]
1166
1155
  optional :template, String, nil?: true
1167
1156
 
1168
- # @!method initialize(channel_id:, connection_id:, outcomes:, channel_name: nil, template: nil)
1157
+ # @!method initialize(channels:, connection_id:, outcomes:, template: nil)
1169
1158
  # Some parameter documentations has been truncated, see
1170
1159
  # {Revox::Models::AssistantCreateResponse::Assistant::Slack} for more details.
1171
1160
  #
1172
- # @param channel_id [String] The Slack channel ID where the notification will be posted.
1161
+ # @param channels [Array<Revox::Models::AssistantCreateResponse::Assistant::Slack::Channel>] The Slack channels eligible to receive the notification. When more than one is c
1173
1162
  #
1174
1163
  # @param connection_id [String] The Nango connection ID linking the org's Slack workspace to Revox.
1175
1164
  #
1176
1165
  # @param outcomes [Array<Symbol, Revox::Models::AssistantCreateResponse::Assistant::Slack::Outcome>] Which call outcomes trigger a Slack notification (e.g. ['interested', 'none']).
1177
1166
  #
1178
- # @param channel_name [String, nil] Human-readable Slack channel name, cached for display in the UI.
1179
- #
1180
1167
  # @param template [String, nil] Optional message template. Supports {{summary}}, {{outcome}}, {{phone}},
1181
1168
  # {{call\_
1182
1169
 
1170
+ class Channel < Revox::Internal::Type::BaseModel
1171
+ # @!attribute id
1172
+ # The Slack channel ID (e.g. 'C01234567').
1173
+ #
1174
+ # @return [String]
1175
+ required :id, String
1176
+
1177
+ # @!attribute name
1178
+ # Human-readable Slack channel name, cached for display in the UI and given to the
1179
+ # LLM when the agent prompt routes by channel name.
1180
+ #
1181
+ # @return [String, nil]
1182
+ optional :name, String, nil?: true
1183
+
1184
+ # @!method initialize(id:, name: nil)
1185
+ # Some parameter documentations has been truncated, see
1186
+ # {Revox::Models::AssistantCreateResponse::Assistant::Slack::Channel} for more
1187
+ # details.
1188
+ #
1189
+ # @param id [String] The Slack channel ID (e.g. 'C01234567').
1190
+ #
1191
+ # @param name [String, nil] Human-readable Slack channel name, cached for display in the UI and given to the
1192
+ end
1193
+
1183
1194
  module Outcome
1184
1195
  extend Revox::Internal::Type::Enum
1185
1196
 
@@ -1187,9 +1198,6 @@ module Revox
1187
1198
  INTERESTED = :interested
1188
1199
  COMPLETED = :completed
1189
1200
  REQUESTED_CALLBACK_LATER = :requested_callback_later
1190
- REQUESTED_CALLBACK_NEW_NUMBER = :requested_callback_new_number
1191
- DO_NOT_CONTACT = :do_not_contact
1192
- AI_AVERSE = :ai_averse
1193
1201
  NONE = :none
1194
1202
 
1195
1203
  # @!method self.values
@@ -1317,6 +1325,22 @@ module Revox
1317
1325
  # @return [Array<Symbol>]
1318
1326
  end
1319
1327
 
1328
+ class TransferDestination < Revox::Internal::Type::BaseModel
1329
+ # @!attribute label
1330
+ #
1331
+ # @return [String]
1332
+ required :label, String
1333
+
1334
+ # @!attribute phone_number
1335
+ #
1336
+ # @return [String]
1337
+ required :phone_number, String
1338
+
1339
+ # @!method initialize(label:, phone_number:)
1340
+ # @param label [String]
1341
+ # @param phone_number [String]
1342
+ end
1343
+
1320
1344
  # @see Revox::Models::AssistantCreateResponse::Assistant#type
1321
1345
  module Type
1322
1346
  extend Revox::Internal::Type::Enum
@@ -1352,7 +1376,7 @@ module Revox
1352
1376
 
1353
1377
  # @!attribute speed
1354
1378
  # The speed of the voice. Range depends on provider: Cartesia 0.6–1.5, ElevenLabs
1355
- # 0.7–1.2. Default is 1.0.
1379
+ # 0.7–1.2, Gradium 0.6–1.5. Default is 1.0.
1356
1380
  #
1357
1381
  # @return [Float, nil]
1358
1382
  optional :speed, Float
@@ -1386,6 +1410,7 @@ module Revox
1386
1410
 
1387
1411
  CARTESIA = :cartesia
1388
1412
  ELEVENLABS = :elevenlabs
1413
+ GRADIUM = :gradium
1389
1414
 
1390
1415
  # @!method self.values
1391
1416
  # @return [Array<Symbol>]
@@ -1500,9 +1525,6 @@ module Revox
1500
1525
  INTERESTED = :interested
1501
1526
  COMPLETED = :completed
1502
1527
  REQUESTED_CALLBACK_LATER = :requested_callback_later
1503
- REQUESTED_CALLBACK_NEW_NUMBER = :requested_callback_new_number
1504
- DO_NOT_CONTACT = :do_not_contact
1505
- AI_AVERSE = :ai_averse
1506
1528
  NONE = :none
1507
1529
 
1508
1530
  # @!method self.values