revox 0.0.2 → 0.2.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 (128) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +96 -0
  3. data/README.md +88 -22
  4. data/lib/revox/client.rb +19 -1
  5. data/lib/revox/internal/transport/base_client.rb +5 -0
  6. data/lib/revox/internal/type/base_model.rb +3 -3
  7. data/lib/revox/internal/util.rb +53 -7
  8. data/lib/revox/models/assistant_create_params.rb +1036 -11
  9. data/lib/revox/models/assistant_create_response.rb +1071 -11
  10. data/lib/revox/models/assistant_delete_params.rb +7 -1
  11. data/lib/revox/models/assistant_list_response.rb +1070 -11
  12. data/lib/revox/models/assistant_retrieve_params.rb +7 -1
  13. data/lib/revox/models/assistant_retrieve_response.rb +1066 -11
  14. data/lib/revox/models/assistant_update_params.rb +1043 -11
  15. data/lib/revox/models/assistant_update_response.rb +1097 -12
  16. data/lib/revox/models/call_create_params.rb +1063 -11
  17. data/lib/revox/models/call_create_response.rb +2507 -87
  18. data/lib/revox/models/call_retrieve_params.rb +7 -1
  19. data/lib/revox/models/call_retrieve_response.rb +2512 -87
  20. data/lib/revox/models/campaign_cancel_params.rb +20 -0
  21. data/lib/revox/models/campaign_cancel_response.rb +16 -0
  22. data/lib/revox/models/campaign_create_params.rb +239 -0
  23. data/lib/revox/models/campaign_create_response.rb +2030 -0
  24. data/lib/revox/models/campaign_delete_params.rb +20 -0
  25. data/lib/revox/models/campaign_delete_response.rb +16 -0
  26. data/lib/revox/models/campaign_export_rows_params.rb +20 -0
  27. data/lib/revox/models/campaign_export_rows_response.rb +22 -0
  28. data/lib/revox/models/campaign_get_rows_params.rb +20 -0
  29. data/lib/revox/models/campaign_get_rows_response.rb +3176 -0
  30. data/lib/revox/models/campaign_list_params.rb +14 -0
  31. data/lib/revox/models/campaign_list_response.rb +2024 -0
  32. data/lib/revox/models/campaign_retrieve_params.rb +20 -0
  33. data/lib/revox/models/campaign_retrieve_response.rb +2032 -0
  34. data/lib/revox/models/users/me_retrieve_response.rb +13 -1
  35. data/lib/revox/models/users/me_update_response.rb +13 -1
  36. data/lib/revox/models/voice_list_response.rb +55 -1
  37. data/lib/revox/models/voice_preview_params.rb +43 -3
  38. data/lib/revox/models/voice_retrieve_params.rb +7 -1
  39. data/lib/revox/models.rb +14 -2
  40. data/lib/revox/resources/assistants.rb +138 -6
  41. data/lib/revox/resources/call.rb +10 -27
  42. data/lib/revox/resources/campaigns.rb +176 -0
  43. data/lib/revox/resources/voices.rb +17 -7
  44. data/lib/revox/version.rb +1 -1
  45. data/lib/revox.rb +15 -2
  46. data/rbi/revox/client.rbi +3 -0
  47. data/rbi/revox/internal/util.rbi +28 -0
  48. data/rbi/revox/models/assistant_create_params.rbi +2135 -102
  49. data/rbi/revox/models/assistant_create_response.rbi +2454 -199
  50. data/rbi/revox/models/assistant_delete_params.rbi +11 -5
  51. data/rbi/revox/models/assistant_list_response.rbi +2448 -195
  52. data/rbi/revox/models/assistant_retrieve_params.rbi +11 -5
  53. data/rbi/revox/models/assistant_retrieve_response.rbi +2401 -210
  54. data/rbi/revox/models/assistant_update_params.rbi +2139 -100
  55. data/rbi/revox/models/assistant_update_response.rbi +2504 -198
  56. data/rbi/revox/models/call_create_params.rbi +2377 -222
  57. data/rbi/revox/models/call_create_response.rbi +5840 -594
  58. data/rbi/revox/models/call_retrieve_params.rbi +11 -5
  59. data/rbi/revox/models/call_retrieve_response.rbi +5872 -618
  60. data/rbi/revox/models/campaign_cancel_params.rbi +33 -0
  61. data/rbi/revox/models/campaign_cancel_response.rbi +23 -0
  62. data/rbi/revox/models/campaign_create_params.rbi +433 -0
  63. data/rbi/revox/models/campaign_create_response.rbi +4170 -0
  64. data/rbi/revox/models/campaign_delete_params.rbi +33 -0
  65. data/rbi/revox/models/campaign_delete_response.rbi +23 -0
  66. data/rbi/revox/models/campaign_export_rows_params.rbi +33 -0
  67. data/rbi/revox/models/campaign_export_rows_response.rbi +29 -0
  68. data/rbi/revox/models/campaign_get_rows_params.rbi +33 -0
  69. data/rbi/revox/models/campaign_get_rows_response.rbi +6706 -0
  70. data/rbi/revox/models/campaign_list_params.rbi +27 -0
  71. data/rbi/revox/models/campaign_list_response.rbi +4156 -0
  72. data/rbi/revox/models/campaign_retrieve_params.rbi +33 -0
  73. data/rbi/revox/models/campaign_retrieve_response.rbi +4175 -0
  74. data/rbi/revox/models/users/me_retrieve_response.rbi +13 -3
  75. data/rbi/revox/models/users/me_update_response.rbi +13 -3
  76. data/rbi/revox/models/voice_list_response.rbi +105 -3
  77. data/rbi/revox/models/voice_preview_params.rbi +60 -2
  78. data/rbi/revox/models/voice_retrieve_params.rbi +6 -1
  79. data/rbi/revox/models.rbi +14 -2
  80. data/rbi/revox/resources/assistants.rbi +301 -6
  81. data/rbi/revox/resources/call.rbi +10 -19
  82. data/rbi/revox/resources/campaigns.rbi +121 -0
  83. data/rbi/revox/resources/voices.rbi +15 -5
  84. data/sig/revox/client.rbs +2 -0
  85. data/sig/revox/internal/util.rbs +14 -0
  86. data/sig/revox/models/assistant_create_params.rbs +841 -4
  87. data/sig/revox/models/assistant_create_response.rbs +860 -3
  88. data/sig/revox/models/assistant_delete_params.rbs +8 -3
  89. data/sig/revox/models/assistant_list_response.rbs +860 -3
  90. data/sig/revox/models/assistant_retrieve_params.rbs +8 -3
  91. data/sig/revox/models/assistant_retrieve_response.rbs +859 -3
  92. data/sig/revox/models/assistant_update_params.rbs +846 -4
  93. data/sig/revox/models/assistant_update_response.rbs +886 -6
  94. data/sig/revox/models/call_create_params.rbs +844 -6
  95. data/sig/revox/models/call_create_response.rbs +2166 -79
  96. data/sig/revox/models/call_retrieve_params.rbs +9 -3
  97. data/sig/revox/models/call_retrieve_response.rbs +2166 -79
  98. data/sig/revox/models/campaign_cancel_params.rbs +20 -0
  99. data/sig/revox/models/campaign_cancel_response.rbs +13 -0
  100. data/sig/revox/models/campaign_create_params.rbs +203 -0
  101. data/sig/revox/models/campaign_create_response.rbs +1694 -0
  102. data/sig/revox/models/campaign_delete_params.rbs +20 -0
  103. data/sig/revox/models/campaign_delete_response.rbs +13 -0
  104. data/sig/revox/models/campaign_export_rows_params.rbs +20 -0
  105. data/sig/revox/models/campaign_export_rows_response.rbs +15 -0
  106. data/sig/revox/models/campaign_get_rows_params.rbs +20 -0
  107. data/sig/revox/models/campaign_get_rows_response.rbs +2688 -0
  108. data/sig/revox/models/campaign_list_params.rbs +14 -0
  109. data/sig/revox/models/campaign_list_response.rbs +1694 -0
  110. data/sig/revox/models/campaign_retrieve_params.rbs +20 -0
  111. data/sig/revox/models/campaign_retrieve_response.rbs +1694 -0
  112. data/sig/revox/models/users/me_retrieve_response.rbs +8 -3
  113. data/sig/revox/models/users/me_update_response.rbs +8 -3
  114. data/sig/revox/models/voice_list_response.rbs +45 -3
  115. data/sig/revox/models/voice_preview_params.rbs +35 -1
  116. data/sig/revox/models/voice_retrieve_params.rbs +5 -1
  117. data/sig/revox/models.rbs +14 -2
  118. data/sig/revox/resources/assistants.rbs +54 -0
  119. data/sig/revox/resources/call.rbs +0 -6
  120. data/sig/revox/resources/campaigns.rbs +49 -0
  121. data/sig/revox/resources/voices.rbs +3 -0
  122. metadata +47 -8
  123. data/lib/revox/models/call_list_params.rb +0 -29
  124. data/lib/revox/models/call_list_response.rb +0 -197
  125. data/rbi/revox/models/call_list_params.rbi +0 -47
  126. data/rbi/revox/models/call_list_response.rbi +0 -401
  127. data/sig/revox/models/call_list_params.rbs +0 -28
  128. data/sig/revox/models/call_list_response.rbs +0 -171
@@ -25,6 +25,17 @@ module Revox
25
25
  # @return [String]
26
26
  required :id, String
27
27
 
28
+ # @!attribute assignee
29
+ # The team member responsible for following up on this call.
30
+ #
31
+ # @return [Revox::Models::CallCreateResponse::Call::Assignee, nil]
32
+ required :assignee, -> { Revox::Models::CallCreateResponse::Call::Assignee }, nil?: true
33
+
34
+ # @!attribute assistant
35
+ #
36
+ # @return [Revox::Models::CallCreateResponse::Call::Assistant, nil]
37
+ required :assistant, -> { Revox::Models::CallCreateResponse::Call::Assistant }, nil?: true
38
+
28
39
  # @!attribute call_attempts
29
40
  # All call attempts for this call order, ordered by most recent first.
30
41
  #
@@ -45,6 +56,18 @@ module Revox
45
56
  # @return [Float]
46
57
  required :calls_count, Float
47
58
 
59
+ # @!attribute campaign
60
+ #
61
+ # @return [Revox::Models::CallCreateResponse::Call::Campaign, nil]
62
+ required :campaign, -> { Revox::Models::CallCreateResponse::Call::Campaign }, nil?: true
63
+
64
+ # @!attribute contact
65
+ # Magic contact variables (prospect identity) extracted from the call's input data
66
+ # and transcript.
67
+ #
68
+ # @return [Revox::Models::CallCreateResponse::Call::Contact]
69
+ required :contact, -> { Revox::Models::CallCreateResponse::Call::Contact }
70
+
48
71
  # @!attribute created_at
49
72
  # The time the call order was created.
50
73
  #
@@ -71,13 +94,15 @@ module Revox
71
94
  required :from_phone_number, String
72
95
 
73
96
  # @!attribute is_cancelled
74
- # Whether the call was cancelled.
97
+ # DEPRECATED: Whether the call has been cancelled. This is derived from `status`.
98
+ # Use `status` instead.
75
99
  #
76
100
  # @return [Boolean]
77
101
  required :is_cancelled, Revox::Internal::Type::Boolean
78
102
 
79
103
  # @!attribute is_completed
80
- # Whether the call is completed or still in progress.
104
+ # DEPRECATED: Whether the call has completed. This is derived from `status`. Use
105
+ # `status` instead.
81
106
  #
82
107
  # @return [Boolean]
83
108
  required :is_completed, Revox::Internal::Type::Boolean
@@ -91,7 +116,7 @@ module Revox
91
116
 
92
117
  # @!attribute llm_model
93
118
  #
94
- # @return [Revox::Models::CallCreateResponse::Call::LlmModel::UnionMember0, Revox::Models::CallCreateResponse::Call::LlmModel::UnionMember1]
119
+ # @return [Revox::Models::CallCreateResponse::Call::LlmModel::UnionMember0, Revox::Models::CallCreateResponse::Call::LlmModel::UnionMember1, Revox::Models::CallCreateResponse::Call::LlmModel::UnionMember2, Revox::Models::CallCreateResponse::Call::LlmModel::UnionMember3]
95
120
  required :llm_model, union: -> { Revox::Models::CallCreateResponse::Call::LlmModel }
96
121
 
97
122
  # @!attribute metadata
@@ -100,11 +125,17 @@ module Revox
100
125
  # @return [Hash{Symbol=>String}, nil]
101
126
  required :metadata, Revox::Internal::Type::HashOf[String], nil?: true
102
127
 
103
- # @!attribute next_call_at
104
- # The next call attempt time.
128
+ # @!attribute organization_id
129
+ # The ID of the organization that owns the call.
105
130
  #
106
- # @return [Object]
107
- required :next_call_at, Revox::Internal::Type::Unknown
131
+ # @return [String]
132
+ required :organization_id, String
133
+
134
+ # @!attribute prompt_variables
135
+ # Variables used to interpolate the prompt.
136
+ #
137
+ # @return [Hash{Symbol=>String}, nil]
138
+ required :prompt_variables, Revox::Internal::Type::HashOf[String], nil?: true
108
139
 
109
140
  # @!attribute scheduled_at
110
141
  # The time the call order is scheduled to start.
@@ -112,6 +143,12 @@ module Revox
112
143
  # @return [Object]
113
144
  required :scheduled_at, Revox::Internal::Type::Unknown
114
145
 
146
+ # @!attribute status
147
+ # The status of the call.
148
+ #
149
+ # @return [Symbol, Revox::Models::CallCreateResponse::Call::Status]
150
+ required :status, enum: -> { Revox::Models::CallCreateResponse::Call::Status }
151
+
115
152
  # @!attribute to_phone_number
116
153
  # The phone number that received the call. Formatted in E.164 format. Example:
117
154
  # +1234567890
@@ -119,7 +156,26 @@ module Revox
119
156
  # @return [String]
120
157
  required :to_phone_number, String
121
158
 
122
- # @!method initialize(id:, call_attempts:, call_retry_config:, calls_count:, created_at:, direction:, first_sentence_delay_ms:, from_phone_number:, is_cancelled:, is_completed:, last_call_attempt:, llm_model:, metadata:, next_call_at:, scheduled_at:, to_phone_number:)
159
+ # @!attribute updated_at
160
+ # The time the call order was last updated (any state change, retry, or analysis
161
+ # result).
162
+ #
163
+ # @return [Object]
164
+ required :updated_at, Revox::Internal::Type::Unknown
165
+
166
+ # @!attribute outcome
167
+ # Business outcome of the call. Null if not computed or no transcript.
168
+ #
169
+ # @return [Symbol, Revox::Models::CallCreateResponse::Call::Outcome, nil]
170
+ optional :outcome, enum: -> { Revox::Models::CallCreateResponse::Call::Outcome }, nil?: true
171
+
172
+ # @!attribute outcome_summary
173
+ # LLM explanation for the outcome, when outcome was computed from the transcript.
174
+ #
175
+ # @return [String, nil]
176
+ optional :outcome_summary, String, nil?: true
177
+
178
+ # @!method initialize(id:, assignee:, assistant:, call_attempts:, call_retry_config:, calls_count:, campaign:, contact:, created_at:, direction:, first_sentence_delay_ms:, from_phone_number:, is_cancelled:, is_completed:, last_call_attempt:, llm_model:, metadata:, organization_id:, prompt_variables:, scheduled_at:, status:, to_phone_number:, updated_at:, outcome: nil, outcome_summary: nil)
123
179
  # Some parameter documentations has been truncated, see
124
180
  # {Revox::Models::CallCreateResponse::Call} for more details.
125
181
  #
@@ -128,12 +184,20 @@ module Revox
128
184
  #
129
185
  # @param id [String] The ID of the call.
130
186
  #
187
+ # @param assignee [Revox::Models::CallCreateResponse::Call::Assignee, nil] The team member responsible for following up on this call.
188
+ #
189
+ # @param assistant [Revox::Models::CallCreateResponse::Call::Assistant, nil]
190
+ #
131
191
  # @param call_attempts [Array<Revox::Models::CallCreateResponse::Call::CallAttempt>] All call attempts for this call order, ordered by most recent first.
132
192
  #
133
193
  # @param call_retry_config [Revox::Models::CallCreateResponse::Call::CallRetryConfig, nil] Configuration for call retry behavior including time windows, delays, and max it
134
194
  #
135
195
  # @param calls_count [Float] The number of call attempts made.
136
196
  #
197
+ # @param campaign [Revox::Models::CallCreateResponse::Call::Campaign, nil]
198
+ #
199
+ # @param contact [Revox::Models::CallCreateResponse::Call::Contact] Magic contact variables (prospect identity) extracted from the call's input data
200
+ #
137
201
  # @param created_at [Object] The time the call order was created.
138
202
  #
139
203
  # @param direction [Symbol, Revox::Models::CallCreateResponse::Call::Direction] Whether the call is inbound or outbound.
@@ -142,141 +206,2018 @@ module Revox
142
206
  #
143
207
  # @param from_phone_number [String] The phone number that made the call. Formatted in E.164 format. Example: +123456
144
208
  #
145
- # @param is_cancelled [Boolean] Whether the call was cancelled.
209
+ # @param is_cancelled [Boolean] DEPRECATED: Whether the call has been cancelled. This is derived from `status`.
146
210
  #
147
- # @param is_completed [Boolean] Whether the call is completed or still in progress.
211
+ # @param is_completed [Boolean] DEPRECATED: Whether the call has completed. This is derived from `status`. Use `
148
212
  #
149
213
  # @param last_call_attempt [Revox::Models::CallCreateResponse::Call::LastCallAttempt, nil] This represent a single call attempt. A call attempt is a single call made to th
150
214
  #
151
- # @param llm_model [Revox::Models::CallCreateResponse::Call::LlmModel::UnionMember0, Revox::Models::CallCreateResponse::Call::LlmModel::UnionMember1]
215
+ # @param llm_model [Revox::Models::CallCreateResponse::Call::LlmModel::UnionMember0, Revox::Models::CallCreateResponse::Call::LlmModel::UnionMember1, Revox::Models::CallCreateResponse::Call::LlmModel::UnionMember2, Revox::Models::CallCreateResponse::Call::LlmModel::UnionMember3]
152
216
  #
153
217
  # @param metadata [Hash{Symbol=>String}, nil] Metadata stored with the call.
154
218
  #
155
- # @param next_call_at [Object] The next call attempt time.
219
+ # @param organization_id [String] The ID of the organization that owns the call.
220
+ #
221
+ # @param prompt_variables [Hash{Symbol=>String}, nil] Variables used to interpolate the prompt.
156
222
  #
157
223
  # @param scheduled_at [Object] The time the call order is scheduled to start.
158
224
  #
225
+ # @param status [Symbol, Revox::Models::CallCreateResponse::Call::Status] The status of the call.
226
+ #
159
227
  # @param to_phone_number [String] The phone number that received the call. Formatted in E.164 format. Example: +12
228
+ #
229
+ # @param updated_at [Object] The time the call order was last updated (any state change, retry, or analysis r
230
+ #
231
+ # @param outcome [Symbol, Revox::Models::CallCreateResponse::Call::Outcome, nil] Business outcome of the call. Null if not computed or no transcript.
232
+ #
233
+ # @param outcome_summary [String, nil] LLM explanation for the outcome, when outcome was computed from the transcript.
160
234
 
161
- class CallAttempt < Revox::Internal::Type::BaseModel
235
+ # @see Revox::Models::CallCreateResponse::Call#assignee
236
+ class Assignee < Revox::Internal::Type::BaseModel
162
237
  # @!attribute id
163
- # The ID of the call attempt.
238
+ # The database user id of the assignee.
164
239
  #
165
240
  # @return [String]
166
241
  required :id, String
167
242
 
168
- # @!attribute answered_at
169
- # The time the call was answered.
243
+ # @!attribute email
170
244
  #
171
- # @return [Object]
172
- required :answered_at, Revox::Internal::Type::Unknown
245
+ # @return [String]
246
+ required :email, String
173
247
 
174
- # @!attribute ended_at
175
- # The time the call ended.
248
+ # @!attribute first_name
176
249
  #
177
- # @return [Object]
178
- required :ended_at, Revox::Internal::Type::Unknown
250
+ # @return [String, nil]
251
+ required :first_name, String, nil?: true
179
252
 
180
- # @!attribute phone_number
181
- # The phone number that was called. Formatted in E.164 format. Example:
182
- # +1234567890
253
+ # @!attribute last_name
254
+ #
255
+ # @return [String, nil]
256
+ required :last_name, String, nil?: true
257
+
258
+ # @!method initialize(id:, email:, first_name:, last_name:)
259
+ # The team member responsible for following up on this call.
260
+ #
261
+ # @param id [String] The database user id of the assignee.
262
+ #
263
+ # @param email [String]
264
+ #
265
+ # @param first_name [String, nil]
266
+ #
267
+ # @param last_name [String, nil]
268
+ end
269
+
270
+ # @see Revox::Models::CallCreateResponse::Call#assistant
271
+ class Assistant < Revox::Internal::Type::BaseModel
272
+ # @!attribute id
183
273
  #
184
274
  # @return [String]
185
- required :phone_number, String
275
+ required :id, String
186
276
 
187
- # @!attribute recording_url
188
- # The URL of the audio recording of the call.
277
+ # @!attribute after_call_sms_outcomes
278
+ # Which call outcomes trigger the after-call SMS. When empty or null, no
279
+ # after-call SMS is sent. Use "none" when outcome is null.
280
+ #
281
+ # @return [Array<Symbol, Revox::Models::CallCreateResponse::Call::Assistant::AfterCallSMSOutcome>, nil]
282
+ required :after_call_sms_outcomes,
283
+ -> { Revox::Internal::Type::ArrayOf[enum: Revox::Models::CallCreateResponse::Call::Assistant::AfterCallSMSOutcome] },
284
+ nil?: true
285
+
286
+ # @!attribute after_call_sms_prompt
287
+ # Prompt / instructions for the after-call SMS. Supports {{variable}}
288
+ # placeholders. When null, no after-call SMS is sent.
189
289
  #
190
290
  # @return [String, nil]
191
- required :recording_url, String, nil?: true
291
+ required :after_call_sms_prompt, String, nil?: true
192
292
 
193
- # @!attribute result
293
+ # @!attribute background_sound
294
+ # Ambient background sound to play during the call. null disables it.
194
295
  #
195
- # @return [Symbol, Revox::Models::CallCreateResponse::Call::CallAttempt::Result, nil]
196
- required :result, enum: -> { Revox::Models::CallCreateResponse::Call::CallAttempt::Result }, nil?: true
296
+ # @return [Symbol, Revox::Models::CallCreateResponse::Call::Assistant::BackgroundSound, nil]
297
+ required :background_sound,
298
+ enum: -> { Revox::Models::CallCreateResponse::Call::Assistant::BackgroundSound },
299
+ nil?: true
197
300
 
198
- # @!attribute started_at
199
- # The time the call started.
301
+ # @!attribute background_sound_volume
302
+ # Volume of the ambient background sound (0 = silent, 1 = max).
303
+ #
304
+ # @return [Float]
305
+ required :background_sound_volume, Float
306
+
307
+ # @!attribute calendly
308
+ #
309
+ # @return [Revox::Models::CallCreateResponse::Call::Assistant::Calendly, nil]
310
+ required :calendly, -> { Revox::Models::CallCreateResponse::Call::Assistant::Calendly }, nil?: true
311
+
312
+ # @!attribute call_retry_config
313
+ # Configuration for call retry behavior including time windows, delays, and max
314
+ # iterations. If not provided, defaults will be used.
315
+ #
316
+ # @return [Revox::Models::CallCreateResponse::Call::Assistant::CallRetryConfig, nil]
317
+ required :call_retry_config,
318
+ -> { Revox::Models::CallCreateResponse::Call::Assistant::CallRetryConfig },
319
+ nil?: true
320
+
321
+ # @!attribute cartesia_dictionary_pronunciation_id
322
+ # Optional Cartesia pronunciation dictionary ID linked to this assistant.
323
+ #
324
+ # @return [String, nil]
325
+ required :cartesia_dictionary_pronunciation_id, String, nil?: true
326
+
327
+ # @!attribute created_at
200
328
  #
201
329
  # @return [Object]
202
- required :started_at, Revox::Internal::Type::Unknown
330
+ required :created_at, Revox::Internal::Type::Unknown
203
331
 
204
- # @!attribute status
205
- # The status of the call attempt.
332
+ # @!attribute custom_tools
206
333
  #
207
- # @return [Symbol, Revox::Models::CallCreateResponse::Call::CallAttempt::Status]
208
- required :status, enum: -> { Revox::Models::CallCreateResponse::Call::CallAttempt::Status }
334
+ # @return [Array<Revox::Models::CallCreateResponse::Call::Assistant::CustomTool>, nil]
335
+ required :custom_tools,
336
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CallCreateResponse::Call::Assistant::CustomTool] },
337
+ nil?: true
209
338
 
210
- # @!attribute structured_output
211
- # The data extracted from the call, using the structured output config from the
212
- # parent call object.
339
+ # @!attribute email_notification_address
340
+ # Email address(es) to receive notifications when a call ends with a matching
341
+ # outcome. Accepts a single email or a comma-separated list (e.g. "alice@x.com,
342
+ # bob@y.com").
213
343
  #
214
- # @return [Hash{Symbol=>Object}, nil]
215
- optional :structured_output,
216
- Revox::Internal::Type::HashOf[Revox::Internal::Type::Unknown],
344
+ # @return [String, nil]
345
+ required :email_notification_address, String, nil?: true
346
+
347
+ # @!attribute email_notification_language
348
+ # The language used for the notification email content. One of "en" or "fr".
349
+ #
350
+ # @return [Symbol, Revox::Models::CallCreateResponse::Call::Assistant::EmailNotificationLanguage]
351
+ required :email_notification_language,
352
+ enum: -> { Revox::Models::CallCreateResponse::Call::Assistant::EmailNotificationLanguage }
353
+
354
+ # @!attribute email_notification_outcomes
355
+ # Which call outcomes trigger an email notification. E.g. ["interested",
356
+ # "completed", "none"]. Use "none" when outcome is null.
357
+ #
358
+ # @return [Array<Symbol, Revox::Models::CallCreateResponse::Call::Assistant::EmailNotificationOutcome>, nil]
359
+ required :email_notification_outcomes,
360
+ -> { Revox::Internal::Type::ArrayOf[enum: Revox::Models::CallCreateResponse::Call::Assistant::EmailNotificationOutcome] },
217
361
  nil?: true
218
362
 
219
- # @!attribute transcript
220
- # The transcript of the call.
363
+ # @!attribute end_of_call_sentence
221
364
  #
222
- # @return [Array<Revox::Models::CallCreateResponse::Call::CallAttempt::Transcript>, nil]
223
- optional :transcript,
224
- -> { Revox::Internal::Type::ArrayOf[Revox::Models::CallCreateResponse::Call::CallAttempt::Transcript] },
365
+ # @return [String, nil]
366
+ required :end_of_call_sentence, String, nil?: true
367
+
368
+ # @!attribute first_sentence
369
+ #
370
+ # @return [String, nil]
371
+ required :first_sentence, String, nil?: true
372
+
373
+ # @!attribute first_sentence_delay_ms
374
+ # Delay in milliseconds before speaking the first sentence. Default: 400.
375
+ #
376
+ # @return [Integer]
377
+ required :first_sentence_delay_ms, Integer
378
+
379
+ # @!attribute first_sentence_mode
380
+ #
381
+ # @return [Symbol, Revox::Models::CallCreateResponse::Call::Assistant::FirstSentenceMode]
382
+ required :first_sentence_mode,
383
+ enum: -> { Revox::Models::CallCreateResponse::Call::Assistant::FirstSentenceMode }
384
+
385
+ # @!attribute from_phone_number
386
+ # Override the default outbound phone number for calls placed with this assistant.
387
+ # When null, the organization's default phone number is used.
388
+ #
389
+ # @return [String, nil]
390
+ required :from_phone_number, String, nil?: true
391
+
392
+ # @!attribute human_transfer_mode
393
+ # Warm or cold transfer when transfer_phone_number is set; null when transfer is
394
+ # not configured.
395
+ #
396
+ # @return [Symbol, Revox::Models::CallCreateResponse::Call::Assistant::HumanTransferMode, nil]
397
+ required :human_transfer_mode,
398
+ enum: -> { Revox::Models::CallCreateResponse::Call::Assistant::HumanTransferMode },
399
+ nil?: true
400
+
401
+ # @!attribute ivr_navigation_enabled
402
+ # Enable IVR navigation tools. When enabled, the assistant can send DTMF tones and
403
+ # skip turns to navigate phone menus.
404
+ #
405
+ # @return [Boolean]
406
+ required :ivr_navigation_enabled, Revox::Internal::Type::Boolean
407
+
408
+ # @!attribute llm_model
409
+ #
410
+ # @return [Revox::Models::CallCreateResponse::Call::Assistant::LlmModel::UnionMember0, Revox::Models::CallCreateResponse::Call::Assistant::LlmModel::UnionMember1, Revox::Models::CallCreateResponse::Call::Assistant::LlmModel::UnionMember2, Revox::Models::CallCreateResponse::Call::Assistant::LlmModel::UnionMember3]
411
+ required :llm_model, union: -> { Revox::Models::CallCreateResponse::Call::Assistant::LlmModel }
412
+
413
+ # @!attribute logo_url
414
+ # Public URL of the brand logo shown on the assistant's demo page. Null when
415
+ # unset.
416
+ #
417
+ # @return [String, nil]
418
+ required :logo_url, String, nil?: true
419
+
420
+ # @!attribute max_call_duration_secs
421
+ # The maximum duration of the call in seconds. This is the maximum time the call
422
+ # will be allowed to run.
423
+ #
424
+ # @return [Float]
425
+ required :max_call_duration_secs, Float
426
+
427
+ # @!attribute max_duration_end_message
428
+ # Optional message the agent will say, without being interruptible, when the call
429
+ # reaches its max duration. Kept short so it fits inside the farewell buffer. If
430
+ # null, the call ends silently.
431
+ #
432
+ # @return [String, nil]
433
+ required :max_duration_end_message, String, nil?: true
434
+
435
+ # @!attribute name
436
+ #
437
+ # @return [String]
438
+ required :name, String
439
+
440
+ # @!attribute organization_id
441
+ #
442
+ # @return [String]
443
+ required :organization_id, String
444
+
445
+ # @!attribute position
446
+ #
447
+ # @return [Revox::Models::CallCreateResponse::Call::Assistant::Position, nil]
448
+ required :position, -> { Revox::Models::CallCreateResponse::Call::Assistant::Position }, nil?: true
449
+
450
+ # @!attribute prompt
451
+ #
452
+ # @return [String]
453
+ required :prompt, String
454
+
455
+ # @!attribute prompt_flow
456
+ #
457
+ # @return [Revox::Models::CallCreateResponse::Call::Assistant::PromptFlow, nil]
458
+ required :prompt_flow, -> { Revox::Models::CallCreateResponse::Call::Assistant::PromptFlow }, nil?: true
459
+
460
+ # @!attribute slack
461
+ #
462
+ # @return [Revox::Models::CallCreateResponse::Call::Assistant::Slack, nil]
463
+ required :slack, -> { Revox::Models::CallCreateResponse::Call::Assistant::Slack }, nil?: true
464
+
465
+ # @!attribute sms_enabled
466
+ # Enable SMS tool during calls. When enabled, the agent can send SMS messages to
467
+ # the user on the call.
468
+ #
469
+ # @return [Boolean]
470
+ required :sms_enabled, Revox::Internal::Type::Boolean
471
+
472
+ # @!attribute sms_template
473
+ # Hardcoded SMS template to send during calls. When set, this exact text is sent
474
+ # instead of letting the agent generate the message. Supports {{variable}}
475
+ # placeholders.
476
+ #
477
+ # @return [String, nil]
478
+ required :sms_template, String, nil?: true
479
+
480
+ # @!attribute structured_output_config
481
+ # The structured output config to use for the call. This is used to extract the
482
+ # data from the call (like email, name, company name, etc.).
483
+ #
484
+ # @return [Array<Revox::Models::CallCreateResponse::Call::Assistant::StructuredOutputConfig>, nil]
485
+ required :structured_output_config,
486
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CallCreateResponse::Call::Assistant::StructuredOutputConfig] },
487
+ nil?: true
488
+
489
+ # @!attribute structured_output_prompt
490
+ # Custom prompt for structured data extraction. If not provided, a default prompt
491
+ # is used. Available variables: {{transcript}}, {{call_direction}},
492
+ # {{user_phone_number}}, {{agent_phone_number}}.
493
+ #
494
+ # @return [String, nil]
495
+ required :structured_output_prompt, String, nil?: true
496
+
497
+ # @!attribute stt_context
498
+ # Assistant-level speech-to-text context: structured `general` key/value pairs
499
+ # plus a list of domain `terms`. Prompt-derived context is merged in without
500
+ # replacing existing entries.
501
+ #
502
+ # @return [Revox::Models::CallCreateResponse::Call::Assistant::SttContext, nil]
503
+ required :stt_context, -> { Revox::Models::CallCreateResponse::Call::Assistant::SttContext }, nil?: true
504
+
505
+ # @!attribute stt_model
506
+ # Transcriber (speech-to-text) model used for the assistant.
507
+ #
508
+ # @return [Symbol, Revox::Models::CallCreateResponse::Call::Assistant::SttModel]
509
+ required :stt_model, enum: -> { Revox::Models::CallCreateResponse::Call::Assistant::SttModel }
510
+
511
+ # @!attribute thinking_sound
512
+ # Audio clip to play while the agent is processing a response. One of the built-in
513
+ # LiveKit audio clips; null disables it.
514
+ #
515
+ # @return [Symbol, Revox::Models::CallCreateResponse::Call::Assistant::ThinkingSound, nil]
516
+ required :thinking_sound,
517
+ enum: -> { Revox::Models::CallCreateResponse::Call::Assistant::ThinkingSound },
225
518
  nil?: true
226
519
 
227
- # @!method initialize(id:, answered_at:, ended_at:, phone_number:, recording_url:, result:, started_at:, status:, structured_output: nil, transcript: nil)
520
+ # @!attribute thinking_sound_probability
521
+ # Probability [0..1] that the thinking sound plays on any given turn; otherwise
522
+ # the agent is silent while thinking.
523
+ #
524
+ # @return [Float]
525
+ required :thinking_sound_probability, Float
526
+
527
+ # @!attribute thinking_sound_volume
528
+ # Volume of the thinking sound (0 = silent, 1 = max).
529
+ #
530
+ # @return [Float]
531
+ required :thinking_sound_volume, Float
532
+
533
+ # @!attribute transfer_phone_number
534
+ # Phone number to transfer calls to when users request to speak to a human agent.
535
+ #
536
+ # @return [String, nil]
537
+ required :transfer_phone_number, String, nil?: true
538
+
539
+ # @!attribute type
540
+ #
541
+ # @return [Symbol, Revox::Models::CallCreateResponse::Call::Assistant::Type]
542
+ required :type, enum: -> { Revox::Models::CallCreateResponse::Call::Assistant::Type }
543
+
544
+ # @!attribute updated_at
545
+ #
546
+ # @return [Object]
547
+ required :updated_at, Revox::Internal::Type::Unknown
548
+
549
+ # @!attribute voice
550
+ #
551
+ # @return [Revox::Models::CallCreateResponse::Call::Assistant::Voice, nil]
552
+ required :voice, -> { Revox::Models::CallCreateResponse::Call::Assistant::Voice }, nil?: true
553
+
554
+ # @!attribute voicemail_message
555
+ # If set, when voicemail is detected the agent will speak this message then hang
556
+ # up; if null, hang up immediately.
557
+ #
558
+ # @return [String, nil]
559
+ required :voicemail_message, String, nil?: true
560
+
561
+ # @!attribute voicemail_sms_prompt
562
+ # Prompt / instructions for the voicemail SMS. Supports {{variable}} placeholders.
563
+ # When null, no SMS is sent on voicemail.
564
+ #
565
+ # @return [String, nil]
566
+ required :voicemail_sms_prompt, String, nil?: true
567
+
568
+ # @!attribute warm_transfer_summary_instructions
569
+ # Warm transfer only: instructions for the supervisor handoff summary; null when
570
+ # not configured or cold transfer.
571
+ #
572
+ # @return [String, nil]
573
+ required :warm_transfer_summary_instructions, String, nil?: true
574
+
575
+ # @!attribute webhook_url
576
+ # The webhook URL to call when the call is completed.
577
+ #
578
+ # @return [String, nil]
579
+ required :webhook_url, String, nil?: true
580
+
581
+ # @!attribute zoho
582
+ #
583
+ # @return [Revox::Models::CallCreateResponse::Call::Assistant::Zoho, nil]
584
+ required :zoho, -> { Revox::Models::CallCreateResponse::Call::Assistant::Zoho }, nil?: true
585
+
586
+ # @!attribute created_by
587
+ # The user who created the assistant.
588
+ #
589
+ # @return [Revox::Models::CallCreateResponse::Call::Assistant::CreatedBy, nil]
590
+ optional :created_by, -> { Revox::Models::CallCreateResponse::Call::Assistant::CreatedBy }, nil?: true
591
+
592
+ # @!attribute faq_items
593
+ #
594
+ # @return [Array<Revox::Models::CallCreateResponse::Call::Assistant::FaqItem>, nil]
595
+ optional :faq_items,
596
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CallCreateResponse::Call::Assistant::FaqItem] }
597
+
598
+ # @!attribute is_realestate_assistant
599
+ #
600
+ # @return [Boolean, nil]
601
+ optional :is_realestate_assistant, Revox::Internal::Type::Boolean
602
+
603
+ # @!attribute pending_faq_count
604
+ #
605
+ # @return [Float, nil]
606
+ optional :pending_faq_count, Float
607
+
608
+ # @!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)
228
609
  # Some parameter documentations has been truncated, see
229
- # {Revox::Models::CallCreateResponse::Call::CallAttempt} for more details.
610
+ # {Revox::Models::CallCreateResponse::Call::Assistant} for more details.
230
611
  #
231
- # This represent a single call attempt. A call attempt is a single call made to
232
- # the phone number.
612
+ # @param id [String]
233
613
  #
234
- # @param id [String] The ID of the call attempt.
614
+ # @param after_call_sms_outcomes [Array<Symbol, Revox::Models::CallCreateResponse::Call::Assistant::AfterCallSMSOutcome>, nil] Which call outcomes trigger the after-call SMS. When empty or null, no after-cal
235
615
  #
236
- # @param answered_at [Object] The time the call was answered.
616
+ # @param after_call_sms_prompt [String, nil] Prompt / instructions for the after-call SMS. Supports {{variable}} placeholders
237
617
  #
238
- # @param ended_at [Object] The time the call ended.
618
+ # @param background_sound [Symbol, Revox::Models::CallCreateResponse::Call::Assistant::BackgroundSound, nil] Ambient background sound to play during the call. null disables it.
239
619
  #
240
- # @param phone_number [String] The phone number that was called. Formatted in E.164 format. Example: +123456789
620
+ # @param background_sound_volume [Float] Volume of the ambient background sound (0 = silent, 1 = max).
241
621
  #
242
- # @param recording_url [String, nil] The URL of the audio recording of the call.
622
+ # @param calendly [Revox::Models::CallCreateResponse::Call::Assistant::Calendly, nil]
243
623
  #
244
- # @param result [Symbol, Revox::Models::CallCreateResponse::Call::CallAttempt::Result, nil]
624
+ # @param call_retry_config [Revox::Models::CallCreateResponse::Call::Assistant::CallRetryConfig, nil] Configuration for call retry behavior including time windows, delays, and max it
245
625
  #
246
- # @param started_at [Object] The time the call started.
626
+ # @param cartesia_dictionary_pronunciation_id [String, nil] Optional Cartesia pronunciation dictionary ID linked to this assistant.
247
627
  #
248
- # @param status [Symbol, Revox::Models::CallCreateResponse::Call::CallAttempt::Status] The status of the call attempt.
628
+ # @param created_at [Object]
249
629
  #
250
- # @param structured_output [Hash{Symbol=>Object}, nil] The data extracted from the call, using the structured output config from the pa
630
+ # @param custom_tools [Array<Revox::Models::CallCreateResponse::Call::Assistant::CustomTool>, nil]
631
+ #
632
+ # @param email_notification_address [String, nil] Email address(es) to receive notifications when a call ends with a matching outc
633
+ #
634
+ # @param email_notification_language [Symbol, Revox::Models::CallCreateResponse::Call::Assistant::EmailNotificationLanguage] The language used for the notification email content. One of "en" or "fr".
635
+ #
636
+ # @param email_notification_outcomes [Array<Symbol, Revox::Models::CallCreateResponse::Call::Assistant::EmailNotificationOutcome>, nil] Which call outcomes trigger an email notification. E.g. ["interested", "complete
637
+ #
638
+ # @param end_of_call_sentence [String, nil]
639
+ #
640
+ # @param first_sentence [String, nil]
641
+ #
642
+ # @param first_sentence_delay_ms [Integer] Delay in milliseconds before speaking the first sentence. Default: 400.
643
+ #
644
+ # @param first_sentence_mode [Symbol, Revox::Models::CallCreateResponse::Call::Assistant::FirstSentenceMode]
645
+ #
646
+ # @param from_phone_number [String, nil] Override the default outbound phone number for calls placed with this assistant.
647
+ #
648
+ # @param human_transfer_mode [Symbol, Revox::Models::CallCreateResponse::Call::Assistant::HumanTransferMode, nil] Warm or cold transfer when transfer_phone_number is set; null when transfer is n
649
+ #
650
+ # @param ivr_navigation_enabled [Boolean] Enable IVR navigation tools. When enabled, the assistant can send DTMF tones and
651
+ #
652
+ # @param llm_model [Revox::Models::CallCreateResponse::Call::Assistant::LlmModel::UnionMember0, Revox::Models::CallCreateResponse::Call::Assistant::LlmModel::UnionMember1, Revox::Models::CallCreateResponse::Call::Assistant::LlmModel::UnionMember2, Revox::Models::CallCreateResponse::Call::Assistant::LlmModel::UnionMember3]
653
+ #
654
+ # @param logo_url [String, nil] Public URL of the brand logo shown on the assistant's demo page. Null when unset
655
+ #
656
+ # @param max_call_duration_secs [Float] The maximum duration of the call in seconds. This is the maximum time the call w
657
+ #
658
+ # @param max_duration_end_message [String, nil] Optional message the agent will say, without being interruptible, when the call
251
659
  #
252
- # @param transcript [Array<Revox::Models::CallCreateResponse::Call::CallAttempt::Transcript>, nil] The transcript of the call.
660
+ # @param name [String]
661
+ #
662
+ # @param organization_id [String]
663
+ #
664
+ # @param position [Revox::Models::CallCreateResponse::Call::Assistant::Position, nil]
665
+ #
666
+ # @param prompt [String]
667
+ #
668
+ # @param prompt_flow [Revox::Models::CallCreateResponse::Call::Assistant::PromptFlow, nil]
669
+ #
670
+ # @param slack [Revox::Models::CallCreateResponse::Call::Assistant::Slack, nil]
671
+ #
672
+ # @param sms_enabled [Boolean] Enable SMS tool during calls. When enabled, the agent can send SMS messages to t
673
+ #
674
+ # @param sms_template [String, nil] Hardcoded SMS template to send during calls. When set, this exact text is sent i
675
+ #
676
+ # @param structured_output_config [Array<Revox::Models::CallCreateResponse::Call::Assistant::StructuredOutputConfig>, nil] The structured output config to use for the call. This is used to extract the da
677
+ #
678
+ # @param structured_output_prompt [String, nil] Custom prompt for structured data extraction. If not provided, a default prompt
679
+ #
680
+ # @param stt_context [Revox::Models::CallCreateResponse::Call::Assistant::SttContext, nil] Assistant-level speech-to-text context: structured `general` key/value pairs plu
681
+ #
682
+ # @param stt_model [Symbol, Revox::Models::CallCreateResponse::Call::Assistant::SttModel] Transcriber (speech-to-text) model used for the assistant.
683
+ #
684
+ # @param thinking_sound [Symbol, Revox::Models::CallCreateResponse::Call::Assistant::ThinkingSound, nil] Audio clip to play while the agent is processing a response. One of the built-in
685
+ #
686
+ # @param thinking_sound_probability [Float] Probability [0..1] that the thinking sound plays on any given turn; otherwise th
687
+ #
688
+ # @param thinking_sound_volume [Float] Volume of the thinking sound (0 = silent, 1 = max).
689
+ #
690
+ # @param transfer_phone_number [String, nil] Phone number to transfer calls to when users request to speak to a human agent.
691
+ #
692
+ # @param type [Symbol, Revox::Models::CallCreateResponse::Call::Assistant::Type]
693
+ #
694
+ # @param updated_at [Object]
695
+ #
696
+ # @param voice [Revox::Models::CallCreateResponse::Call::Assistant::Voice, nil]
697
+ #
698
+ # @param voicemail_message [String, nil] If set, when voicemail is detected the agent will speak this message then hang u
699
+ #
700
+ # @param voicemail_sms_prompt [String, nil] Prompt / instructions for the voicemail SMS. Supports {{variable}} placeholders.
701
+ #
702
+ # @param warm_transfer_summary_instructions [String, nil] Warm transfer only: instructions for the supervisor handoff summary; null when n
703
+ #
704
+ # @param webhook_url [String, nil] The webhook URL to call when the call is completed.
705
+ #
706
+ # @param zoho [Revox::Models::CallCreateResponse::Call::Assistant::Zoho, nil]
707
+ #
708
+ # @param created_by [Revox::Models::CallCreateResponse::Call::Assistant::CreatedBy, nil] The user who created the assistant.
709
+ #
710
+ # @param faq_items [Array<Revox::Models::CallCreateResponse::Call::Assistant::FaqItem>]
711
+ #
712
+ # @param is_realestate_assistant [Boolean]
713
+ #
714
+ # @param pending_faq_count [Float]
253
715
 
254
- # @see Revox::Models::CallCreateResponse::Call::CallAttempt#result
255
- module Result
716
+ module AfterCallSMSOutcome
256
717
  extend Revox::Internal::Type::Enum
257
718
 
258
- IVR = :IVR
259
- VOICEMAIL = :voicemail
260
- HUMAN = :human
719
+ NOT_INTERESTED = :not_interested
720
+ INTERESTED = :interested
721
+ COMPLETED = :completed
722
+ REQUESTED_CALLBACK_LATER = :requested_callback_later
723
+ REQUESTED_CALLBACK_NEW_NUMBER = :requested_callback_new_number
724
+ DO_NOT_CONTACT = :do_not_contact
725
+ AI_AVERSE = :ai_averse
726
+ NONE = :none
727
+
728
+ # @!method self.values
729
+ # @return [Array<Symbol>]
730
+ end
731
+
732
+ # Ambient background sound to play during the call. null disables it.
733
+ #
734
+ # @see Revox::Models::CallCreateResponse::Call::Assistant#background_sound
735
+ module BackgroundSound
736
+ extend Revox::Internal::Type::Enum
737
+
738
+ AUDIO_OFFICE_OGG = :"audio/office.ogg"
739
+
740
+ # @!method self.values
741
+ # @return [Array<Symbol>]
742
+ end
743
+
744
+ # @see Revox::Models::CallCreateResponse::Call::Assistant#calendly
745
+ class Calendly < Revox::Internal::Type::BaseModel
746
+ # @!attribute connection_id
747
+ # The connection ID representing the link between your Calendly account and Revox.
748
+ #
749
+ # @return [String]
750
+ required :connection_id, String
751
+
752
+ # @!attribute event_type_id
753
+ # The event type ID representing the event type to schedule. (eg:
754
+ # https://api.calendly.com/event_types/b2330295-2a91-4a1d-bb73-99e7707663d5)
755
+ #
756
+ # @return [String]
757
+ required :event_type_id, String
758
+
759
+ # @!method initialize(connection_id:, event_type_id:)
760
+ # Some parameter documentations has been truncated, see
761
+ # {Revox::Models::CallCreateResponse::Call::Assistant::Calendly} for more details.
762
+ #
763
+ # @param connection_id [String] The connection ID representing the link between your Calendly account and Revox.
764
+ #
765
+ # @param event_type_id [String] The event type ID representing the event type to schedule. (eg: https://api.cale
766
+ end
767
+
768
+ # @see Revox::Models::CallCreateResponse::Call::Assistant#call_retry_config
769
+ class CallRetryConfig < Revox::Internal::Type::BaseModel
770
+ # @!attribute allowed_days
771
+ # Days of the week when calls are allowed, in the recipient's timezone. Default:
772
+ # Monday through Friday.
773
+ #
774
+ # @return [Array<Symbol, Revox::Models::CallCreateResponse::Call::Assistant::CallRetryConfig::AllowedDay>]
775
+ required :allowed_days,
776
+ -> { Revox::Internal::Type::ArrayOf[enum: Revox::Models::CallCreateResponse::Call::Assistant::CallRetryConfig::AllowedDay] }
777
+
778
+ # @!attribute call_twice_in_a_row
779
+ # If true and max_retry_attempts >= 2, attempt #2 fires immediately (skipping
780
+ # retry_delay_seconds) when attempt #1 didn't reach a human.
781
+ # Calling-window/allowed-days checks still apply. Only affects the 1→2 transition.
782
+ # Default: false.
783
+ #
784
+ # @return [Boolean]
785
+ required :call_twice_in_a_row, Revox::Internal::Type::Boolean
786
+
787
+ # @!attribute calling_windows
788
+ #
789
+ # @return [Array<Revox::Models::CallCreateResponse::Call::Assistant::CallRetryConfig::CallingWindow>]
790
+ required :calling_windows,
791
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CallCreateResponse::Call::Assistant::CallRetryConfig::CallingWindow] }
792
+
793
+ # @!attribute max_retry_attempts
794
+ # Maximum number of call retry attempts. Default: 3.
795
+ #
796
+ # @return [Integer]
797
+ required :max_retry_attempts, Integer
798
+
799
+ # @!attribute timezone
800
+ # Optional IANA timezone identifier to override the automatic timezone detection
801
+ # from phone number. If not provided, timezone is determined from the recipient's
802
+ # phone number country code. Examples: 'America/New_York', 'Europe/Paris'.
803
+ #
804
+ # @return [String, nil]
805
+ optional :timezone, String, nil?: true
806
+
807
+ # @!method initialize(allowed_days:, call_twice_in_a_row:, calling_windows:, max_retry_attempts:, timezone: nil)
808
+ # Some parameter documentations has been truncated, see
809
+ # {Revox::Models::CallCreateResponse::Call::Assistant::CallRetryConfig} for more
810
+ # details.
811
+ #
812
+ # Configuration for call retry behavior including time windows, delays, and max
813
+ # iterations. If not provided, defaults will be used.
814
+ #
815
+ # @param allowed_days [Array<Symbol, Revox::Models::CallCreateResponse::Call::Assistant::CallRetryConfig::AllowedDay>] Days of the week when calls are allowed, in the recipient's timezone. Default: M
816
+ #
817
+ # @param call_twice_in_a_row [Boolean] If true and max_retry_attempts >= 2, attempt #2 fires immediately (skipping retr
818
+ #
819
+ # @param calling_windows [Array<Revox::Models::CallCreateResponse::Call::Assistant::CallRetryConfig::CallingWindow>]
820
+ #
821
+ # @param max_retry_attempts [Integer] Maximum number of call retry attempts. Default: 3.
822
+ #
823
+ # @param timezone [String, nil] Optional IANA timezone identifier to override the automatic timezone detection f
824
+
825
+ module AllowedDay
826
+ extend Revox::Internal::Type::Enum
827
+
828
+ MONDAY = :monday
829
+ TUESDAY = :tuesday
830
+ WEDNESDAY = :wednesday
831
+ THURSDAY = :thursday
832
+ FRIDAY = :friday
833
+ SATURDAY = :saturday
834
+ SUNDAY = :sunday
835
+
836
+ # @!method self.values
837
+ # @return [Array<Symbol>]
838
+ end
839
+
840
+ class CallingWindow < Revox::Internal::Type::BaseModel
841
+ # @!attribute calling_window_end_time
842
+ # End time for the calling window in the recipient's timezone (or
843
+ # timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
844
+ # Examples: '17:00', '6pm'. Default: '18:00'.
845
+ #
846
+ # @return [String]
847
+ required :calling_window_end_time, String
848
+
849
+ # @!attribute calling_window_start_time
850
+ # Start time for the calling window in the recipient's timezone (or
851
+ # timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
852
+ # Examples: '09:00', '10am'. Default: '10:00'.
853
+ #
854
+ # @return [String]
855
+ required :calling_window_start_time, String
856
+
857
+ # @!attribute retry_delay_seconds
858
+ # Delay between retry attempts in seconds. Default: 7200 (2 hours).
859
+ #
860
+ # @return [Integer]
861
+ required :retry_delay_seconds, Integer
862
+
863
+ # @!method initialize(calling_window_end_time:, calling_window_start_time:, retry_delay_seconds:)
864
+ # Some parameter documentations has been truncated, see
865
+ # {Revox::Models::CallCreateResponse::Call::Assistant::CallRetryConfig::CallingWindow}
866
+ # for more details.
867
+ #
868
+ # @param calling_window_end_time [String] End time for the calling window in the recipient's timezone (or timezone_overrid
869
+ #
870
+ # @param calling_window_start_time [String] Start time for the calling window in the recipient's timezone (or timezone_overr
871
+ #
872
+ # @param retry_delay_seconds [Integer] Delay between retry attempts in seconds. Default: 7200 (2 hours).
873
+ end
874
+ end
875
+
876
+ class CustomTool < Revox::Internal::Type::BaseModel
877
+ # @!attribute body_template
878
+ # JSON body template for the request. Use quoted {{variable}} placeholders (e.g.
879
+ # "{{name}}") for dynamic values
880
+ #
881
+ # @return [String, nil]
882
+ required :body_template, String, nil?: true
883
+
884
+ # @!attribute description
885
+ # Human-readable description of what the tool does, used by the LLM to decide when
886
+ # to call it
887
+ #
888
+ # @return [String]
889
+ required :description, String
890
+
891
+ # @!attribute headers
892
+ # HTTP headers to include in the request. Values support {{variable}} placeholders
893
+ #
894
+ # @return [Array<Revox::Models::CallCreateResponse::Call::Assistant::CustomTool::Header>]
895
+ required :headers,
896
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CallCreateResponse::Call::Assistant::CustomTool::Header] }
897
+
898
+ # @!attribute input_schema
899
+ # Schema defining the parameters the LLM should extract from the conversation to
900
+ # pass to this tool
901
+ #
902
+ # @return [Array<Revox::Models::CallCreateResponse::Call::Assistant::CustomTool::InputSchema>]
903
+ required :input_schema,
904
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CallCreateResponse::Call::Assistant::CustomTool::InputSchema] }
905
+
906
+ # @!attribute method_
907
+ # HTTP method to use when calling the API endpoint
908
+ #
909
+ # @return [Symbol, Revox::Models::CallCreateResponse::Call::Assistant::CustomTool::Method]
910
+ required :method_,
911
+ enum: -> { Revox::Models::CallCreateResponse::Call::Assistant::CustomTool::Method },
912
+ api_name: :method
913
+
914
+ # @!attribute name
915
+ # Unique tool name in lowercase_snake_case (e.g. check_inventory)
916
+ #
917
+ # @return [String]
918
+ required :name, String
919
+
920
+ # @!attribute query_params
921
+ # Query string parameters appended to the URL. Values support {{variable}}
922
+ # placeholders
923
+ #
924
+ # @return [Array<Revox::Models::CallCreateResponse::Call::Assistant::CustomTool::QueryParam>]
925
+ required :query_params,
926
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CallCreateResponse::Call::Assistant::CustomTool::QueryParam] }
927
+
928
+ # @!attribute url
929
+ # Full URL of the API endpoint. Supports {{variable}} placeholders for dynamic
930
+ # values
931
+ #
932
+ # @return [String]
933
+ required :url, String
934
+
935
+ # @!method initialize(body_template:, description:, headers:, input_schema:, method_:, name:, query_params:, url:)
936
+ # Some parameter documentations has been truncated, see
937
+ # {Revox::Models::CallCreateResponse::Call::Assistant::CustomTool} for more
938
+ # details.
939
+ #
940
+ # @param body_template [String, nil] JSON body template for the request. Use quoted {{variable}} placeholders (e.g. "
941
+ #
942
+ # @param description [String] Human-readable description of what the tool does, used by the LLM to decide when
943
+ #
944
+ # @param headers [Array<Revox::Models::CallCreateResponse::Call::Assistant::CustomTool::Header>] HTTP headers to include in the request. Values support {{variable}} placeholders
945
+ #
946
+ # @param input_schema [Array<Revox::Models::CallCreateResponse::Call::Assistant::CustomTool::InputSchema>] Schema defining the parameters the LLM should extract from the conversation to p
947
+ #
948
+ # @param method_ [Symbol, Revox::Models::CallCreateResponse::Call::Assistant::CustomTool::Method] HTTP method to use when calling the API endpoint
949
+ #
950
+ # @param name [String] Unique tool name in lowercase_snake_case (e.g. check_inventory)
951
+ #
952
+ # @param query_params [Array<Revox::Models::CallCreateResponse::Call::Assistant::CustomTool::QueryParam>] Query string parameters appended to the URL. Values support {{variable}} placeho
953
+ #
954
+ # @param url [String] Full URL of the API endpoint. Supports {{variable}} placeholders for dynamic val
955
+
956
+ class Header < Revox::Internal::Type::BaseModel
957
+ # @!attribute key
958
+ #
959
+ # @return [String]
960
+ required :key, String
961
+
962
+ # @!attribute value
963
+ #
964
+ # @return [String]
965
+ required :value, String
966
+
967
+ # @!method initialize(key:, value:)
968
+ # @param key [String]
969
+ # @param value [String]
970
+ end
971
+
972
+ class InputSchema < Revox::Internal::Type::BaseModel
973
+ # @!attribute name
974
+ #
975
+ # @return [String]
976
+ required :name, String
977
+
978
+ # @!attribute required
979
+ #
980
+ # @return [Boolean]
981
+ required :required, Revox::Internal::Type::Boolean
982
+
983
+ # @!attribute type
984
+ #
985
+ # @return [Symbol, Revox::Models::CallCreateResponse::Call::Assistant::CustomTool::InputSchema::Type]
986
+ required :type,
987
+ enum: -> { Revox::Models::CallCreateResponse::Call::Assistant::CustomTool::InputSchema::Type }
988
+
989
+ # @!attribute description
990
+ #
991
+ # @return [String, nil]
992
+ optional :description, String
993
+
994
+ # @!attribute enum_options
995
+ #
996
+ # @return [Array<String>, nil]
997
+ optional :enum_options, Revox::Internal::Type::ArrayOf[String]
998
+
999
+ # @!method initialize(name:, required:, type:, description: nil, enum_options: nil)
1000
+ # @param name [String]
1001
+ # @param required [Boolean]
1002
+ # @param type [Symbol, Revox::Models::CallCreateResponse::Call::Assistant::CustomTool::InputSchema::Type]
1003
+ # @param description [String]
1004
+ # @param enum_options [Array<String>]
1005
+
1006
+ # @see Revox::Models::CallCreateResponse::Call::Assistant::CustomTool::InputSchema#type
1007
+ module Type
1008
+ extend Revox::Internal::Type::Enum
1009
+
1010
+ STRING = :string
1011
+ NUMBER = :number
1012
+ BOOLEAN = :boolean
1013
+ ENUM = :enum
1014
+ DATE = :date
1015
+ DATETIME = :datetime
1016
+
1017
+ # @!method self.values
1018
+ # @return [Array<Symbol>]
1019
+ end
1020
+ end
1021
+
1022
+ # HTTP method to use when calling the API endpoint
1023
+ #
1024
+ # @see Revox::Models::CallCreateResponse::Call::Assistant::CustomTool#method_
1025
+ module Method
1026
+ extend Revox::Internal::Type::Enum
1027
+
1028
+ GET = :GET
1029
+ POST = :POST
1030
+ PUT = :PUT
1031
+ PATCH = :PATCH
1032
+ DELETE = :DELETE
1033
+
1034
+ # @!method self.values
1035
+ # @return [Array<Symbol>]
1036
+ end
1037
+
1038
+ class QueryParam < Revox::Internal::Type::BaseModel
1039
+ # @!attribute key
1040
+ #
1041
+ # @return [String]
1042
+ required :key, String
1043
+
1044
+ # @!attribute value
1045
+ #
1046
+ # @return [String]
1047
+ required :value, String
1048
+
1049
+ # @!method initialize(key:, value:)
1050
+ # @param key [String]
1051
+ # @param value [String]
1052
+ end
1053
+ end
1054
+
1055
+ # The language used for the notification email content. One of "en" or "fr".
1056
+ #
1057
+ # @see Revox::Models::CallCreateResponse::Call::Assistant#email_notification_language
1058
+ module EmailNotificationLanguage
1059
+ extend Revox::Internal::Type::Enum
1060
+
1061
+ EN = :en
1062
+ FR = :fr
1063
+
1064
+ # @!method self.values
1065
+ # @return [Array<Symbol>]
1066
+ end
1067
+
1068
+ module EmailNotificationOutcome
1069
+ extend Revox::Internal::Type::Enum
1070
+
1071
+ NOT_INTERESTED = :not_interested
1072
+ INTERESTED = :interested
1073
+ COMPLETED = :completed
1074
+ REQUESTED_CALLBACK_LATER = :requested_callback_later
1075
+ REQUESTED_CALLBACK_NEW_NUMBER = :requested_callback_new_number
1076
+ DO_NOT_CONTACT = :do_not_contact
1077
+ AI_AVERSE = :ai_averse
1078
+ NONE = :none
1079
+
1080
+ # @!method self.values
1081
+ # @return [Array<Symbol>]
1082
+ end
1083
+
1084
+ # @see Revox::Models::CallCreateResponse::Call::Assistant#first_sentence_mode
1085
+ module FirstSentenceMode
1086
+ extend Revox::Internal::Type::Enum
1087
+
1088
+ GENERATED = :generated
1089
+ STATIC = :static
1090
+ NONE = :none
1091
+
1092
+ # @!method self.values
1093
+ # @return [Array<Symbol>]
1094
+ end
1095
+
1096
+ # Warm or cold transfer when transfer_phone_number is set; null when transfer is
1097
+ # not configured.
1098
+ #
1099
+ # @see Revox::Models::CallCreateResponse::Call::Assistant#human_transfer_mode
1100
+ module HumanTransferMode
1101
+ extend Revox::Internal::Type::Enum
1102
+
1103
+ WARM = :warm
1104
+ COLD = :cold
1105
+
1106
+ # @!method self.values
1107
+ # @return [Array<Symbol>]
1108
+ end
1109
+
1110
+ # @see Revox::Models::CallCreateResponse::Call::Assistant#llm_model
1111
+ module LlmModel
1112
+ extend Revox::Internal::Type::Union
1113
+
1114
+ variant -> { Revox::Models::CallCreateResponse::Call::Assistant::LlmModel::UnionMember0 }
1115
+
1116
+ variant -> { Revox::Models::CallCreateResponse::Call::Assistant::LlmModel::UnionMember1 }
1117
+
1118
+ variant -> { Revox::Models::CallCreateResponse::Call::Assistant::LlmModel::UnionMember2 }
1119
+
1120
+ variant -> { Revox::Models::CallCreateResponse::Call::Assistant::LlmModel::UnionMember3 }
1121
+
1122
+ class UnionMember0 < Revox::Internal::Type::BaseModel
1123
+ # @!attribute name
1124
+ #
1125
+ # @return [Symbol, Revox::Models::CallCreateResponse::Call::Assistant::LlmModel::UnionMember0::Name]
1126
+ required :name,
1127
+ enum: -> { Revox::Models::CallCreateResponse::Call::Assistant::LlmModel::UnionMember0::Name }
1128
+
1129
+ # @!attribute type
1130
+ #
1131
+ # @return [Symbol, :"dedicated-instance"]
1132
+ required :type, const: :"dedicated-instance"
1133
+
1134
+ # @!method initialize(name:, type: :"dedicated-instance")
1135
+ # @param name [Symbol, Revox::Models::CallCreateResponse::Call::Assistant::LlmModel::UnionMember0::Name]
1136
+ # @param type [Symbol, :"dedicated-instance"]
1137
+
1138
+ # @see Revox::Models::CallCreateResponse::Call::Assistant::LlmModel::UnionMember0#name
1139
+ module Name
1140
+ extend Revox::Internal::Type::Enum
1141
+
1142
+ GPT_4_1 = :"gpt-4.1"
1143
+ MINISTRAL_3_8B_INSTRUCT = :"ministral-3-8b-instruct"
1144
+
1145
+ # @!method self.values
1146
+ # @return [Array<Symbol>]
1147
+ end
1148
+ end
1149
+
1150
+ class UnionMember1 < Revox::Internal::Type::BaseModel
1151
+ # @!attribute openrouter_model_id
1152
+ # The model ID to use from OpenRouter. eg: openai/gpt-4.1
1153
+ #
1154
+ # @return [String]
1155
+ required :openrouter_model_id, String
1156
+
1157
+ # @!attribute openrouter_provider
1158
+ # The provider to use from OpenRouter. eg: nebius, openai, azure, etc.
1159
+ #
1160
+ # @return [String]
1161
+ required :openrouter_provider, String
1162
+
1163
+ # @!attribute type
1164
+ # Use a model from OpenRouter.
1165
+ #
1166
+ # @return [Symbol, :openrouter]
1167
+ required :type, const: :openrouter
1168
+
1169
+ # @!method initialize(openrouter_model_id:, openrouter_provider:, type: :openrouter)
1170
+ # @param openrouter_model_id [String] The model ID to use from OpenRouter. eg: openai/gpt-4.1
1171
+ #
1172
+ # @param openrouter_provider [String] The provider to use from OpenRouter. eg: nebius, openai, azure, etc.
1173
+ #
1174
+ # @param type [Symbol, :openrouter] Use a model from OpenRouter.
1175
+ end
1176
+
1177
+ class UnionMember2 < Revox::Internal::Type::BaseModel
1178
+ # @!attribute api_key
1179
+ # API key sent as Bearer token to the custom endpoint.
1180
+ #
1181
+ # @return [String]
1182
+ required :api_key, String
1183
+
1184
+ # @!attribute api_url
1185
+ # Base URL for the OpenAI-compatible API, e.g. https://api.together.xyz/v1
1186
+ #
1187
+ # @return [String]
1188
+ required :api_url, String
1189
+
1190
+ # @!attribute model_name
1191
+ # Model name as expected by the provider, e.g. meta-llama/llama-3-70b
1192
+ #
1193
+ # @return [String]
1194
+ required :model_name, String
1195
+
1196
+ # @!attribute type
1197
+ # OpenAI-compatible chat completions API (bring your own endpoint and key).
1198
+ #
1199
+ # @return [Symbol, :custom]
1200
+ required :type, const: :custom
1201
+
1202
+ # @!method initialize(api_key:, api_url:, model_name:, type: :custom)
1203
+ # @param api_key [String] API key sent as Bearer token to the custom endpoint.
1204
+ #
1205
+ # @param api_url [String] Base URL for the OpenAI-compatible API, e.g. https://api.together.xyz/v1
1206
+ #
1207
+ # @param model_name [String] Model name as expected by the provider, e.g. meta-llama/llama-3-70b
1208
+ #
1209
+ # @param type [Symbol, :custom] OpenAI-compatible chat completions API (bring your own endpoint and key).
1210
+ end
1211
+
1212
+ class UnionMember3 < Revox::Internal::Type::BaseModel
1213
+ # @!attribute provider
1214
+ # The provider to use from Realtime. eg: openai, google.
1215
+ #
1216
+ # @return [Symbol, Revox::Models::CallCreateResponse::Call::Assistant::LlmModel::UnionMember3::Provider]
1217
+ required :provider,
1218
+ enum: -> { Revox::Models::CallCreateResponse::Call::Assistant::LlmModel::UnionMember3::Provider }
1219
+
1220
+ # @!attribute realtime_model_id
1221
+ # The model ID to use from Realtime. eg: gpt-4.1
1222
+ #
1223
+ # @return [String]
1224
+ required :realtime_model_id, String
1225
+
1226
+ # @!attribute type
1227
+ # Use a model from Realtime.
1228
+ #
1229
+ # @return [Symbol, :realtime]
1230
+ required :type, const: :realtime
1231
+
1232
+ # @!attribute realtime_voice_id
1233
+ # Output voice for the realtime provider (e.g. OpenAI: marin; Gemini: Puck).
1234
+ #
1235
+ # @return [String, nil]
1236
+ optional :realtime_voice_id, String
1237
+
1238
+ # @!method initialize(provider:, realtime_model_id:, realtime_voice_id: nil, type: :realtime)
1239
+ # @param provider [Symbol, Revox::Models::CallCreateResponse::Call::Assistant::LlmModel::UnionMember3::Provider] The provider to use from Realtime. eg: openai, google.
1240
+ #
1241
+ # @param realtime_model_id [String] The model ID to use from Realtime. eg: gpt-4.1
1242
+ #
1243
+ # @param realtime_voice_id [String] Output voice for the realtime provider (e.g. OpenAI: marin; Gemini: Puck).
1244
+ #
1245
+ # @param type [Symbol, :realtime] Use a model from Realtime.
1246
+
1247
+ # The provider to use from Realtime. eg: openai, google.
1248
+ #
1249
+ # @see Revox::Models::CallCreateResponse::Call::Assistant::LlmModel::UnionMember3#provider
1250
+ module Provider
1251
+ extend Revox::Internal::Type::Enum
1252
+
1253
+ OPENAI = :openai
1254
+ GOOGLE = :google
1255
+
1256
+ # @!method self.values
1257
+ # @return [Array<Symbol>]
1258
+ end
1259
+ end
1260
+
1261
+ # @!method self.variants
1262
+ # @return [Array(Revox::Models::CallCreateResponse::Call::Assistant::LlmModel::UnionMember0, Revox::Models::CallCreateResponse::Call::Assistant::LlmModel::UnionMember1, Revox::Models::CallCreateResponse::Call::Assistant::LlmModel::UnionMember2, Revox::Models::CallCreateResponse::Call::Assistant::LlmModel::UnionMember3)]
1263
+ end
1264
+
1265
+ # @see Revox::Models::CallCreateResponse::Call::Assistant#position
1266
+ class Position < Revox::Internal::Type::BaseModel
1267
+ # @!attribute x
1268
+ #
1269
+ # @return [Float]
1270
+ required :x, Float
1271
+
1272
+ # @!attribute y_
1273
+ #
1274
+ # @return [Float]
1275
+ required :y_, Float, api_name: :y
1276
+
1277
+ # @!method initialize(x:, y_:)
1278
+ # @param x [Float]
1279
+ # @param y_ [Float]
1280
+ end
1281
+
1282
+ # @see Revox::Models::CallCreateResponse::Call::Assistant#prompt_flow
1283
+ class PromptFlow < Revox::Internal::Type::BaseModel
1284
+ # @!attribute edges
1285
+ #
1286
+ # @return [Array<Revox::Models::CallCreateResponse::Call::Assistant::PromptFlow::Edge>]
1287
+ required :edges,
1288
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CallCreateResponse::Call::Assistant::PromptFlow::Edge] }
1289
+
1290
+ # @!attribute nodes
1291
+ #
1292
+ # @return [Array<Revox::Models::CallCreateResponse::Call::Assistant::PromptFlow::Node>]
1293
+ required :nodes,
1294
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CallCreateResponse::Call::Assistant::PromptFlow::Node] }
1295
+
1296
+ # @!method initialize(edges:, nodes:)
1297
+ # @param edges [Array<Revox::Models::CallCreateResponse::Call::Assistant::PromptFlow::Edge>]
1298
+ # @param nodes [Array<Revox::Models::CallCreateResponse::Call::Assistant::PromptFlow::Node>]
1299
+
1300
+ class Edge < Revox::Internal::Type::BaseModel
1301
+ # @!attribute id
1302
+ #
1303
+ # @return [String]
1304
+ required :id, String
1305
+
1306
+ # @!attribute source
1307
+ #
1308
+ # @return [String]
1309
+ required :source, String
1310
+
1311
+ # @!attribute target
1312
+ #
1313
+ # @return [String]
1314
+ required :target, String
1315
+
1316
+ # @!method initialize(id:, source:, target:)
1317
+ # @param id [String]
1318
+ # @param source [String]
1319
+ # @param target [String]
1320
+ end
1321
+
1322
+ class Node < Revox::Internal::Type::BaseModel
1323
+ # @!attribute id
1324
+ #
1325
+ # @return [String]
1326
+ required :id, String
1327
+
1328
+ # @!attribute data
1329
+ #
1330
+ # @return [Revox::Models::CallCreateResponse::Call::Assistant::PromptFlow::Node::Data]
1331
+ required :data, -> { Revox::Models::CallCreateResponse::Call::Assistant::PromptFlow::Node::Data }
1332
+
1333
+ # @!attribute position
1334
+ #
1335
+ # @return [Revox::Models::CallCreateResponse::Call::Assistant::PromptFlow::Node::Position]
1336
+ required :position, -> { Revox::Models::CallCreateResponse::Call::Assistant::PromptFlow::Node::Position }
1337
+
1338
+ # @!attribute type
1339
+ #
1340
+ # @return [Symbol, :promptBlock]
1341
+ required :type, const: :promptBlock
1342
+
1343
+ # @!method initialize(id:, data:, position:, type: :promptBlock)
1344
+ # @param id [String]
1345
+ # @param data [Revox::Models::CallCreateResponse::Call::Assistant::PromptFlow::Node::Data]
1346
+ # @param position [Revox::Models::CallCreateResponse::Call::Assistant::PromptFlow::Node::Position]
1347
+ # @param type [Symbol, :promptBlock]
1348
+
1349
+ # @see Revox::Models::CallCreateResponse::Call::Assistant::PromptFlow::Node#data
1350
+ class Data < Revox::Internal::Type::BaseModel
1351
+ # @!attribute body
1352
+ #
1353
+ # @return [String]
1354
+ required :body, String
1355
+
1356
+ # @!attribute title
1357
+ #
1358
+ # @return [String]
1359
+ required :title, String
1360
+
1361
+ # @!method initialize(body:, title:)
1362
+ # @param body [String]
1363
+ # @param title [String]
1364
+ end
1365
+
1366
+ # @see Revox::Models::CallCreateResponse::Call::Assistant::PromptFlow::Node#position
1367
+ class Position < Revox::Internal::Type::BaseModel
1368
+ # @!attribute x
1369
+ #
1370
+ # @return [Float]
1371
+ required :x, Float
1372
+
1373
+ # @!attribute y_
1374
+ #
1375
+ # @return [Float]
1376
+ required :y_, Float, api_name: :y
1377
+
1378
+ # @!method initialize(x:, y_:)
1379
+ # @param x [Float]
1380
+ # @param y_ [Float]
1381
+ end
1382
+ end
1383
+ end
1384
+
1385
+ # @see Revox::Models::CallCreateResponse::Call::Assistant#slack
1386
+ class Slack < Revox::Internal::Type::BaseModel
1387
+ # @!attribute channel_id
1388
+ # The Slack channel ID where the notification will be posted.
1389
+ #
1390
+ # @return [String]
1391
+ required :channel_id, String
1392
+
1393
+ # @!attribute connection_id
1394
+ # The Nango connection ID linking the org's Slack workspace to Revox.
1395
+ #
1396
+ # @return [String]
1397
+ required :connection_id, String
1398
+
1399
+ # @!attribute outcomes
1400
+ # Which call outcomes trigger a Slack notification (e.g. ['interested', 'none']).
1401
+ # Use 'none' to notify when outcome is null.
1402
+ #
1403
+ # @return [Array<Symbol, Revox::Models::CallCreateResponse::Call::Assistant::Slack::Outcome>]
1404
+ required :outcomes,
1405
+ -> { Revox::Internal::Type::ArrayOf[enum: Revox::Models::CallCreateResponse::Call::Assistant::Slack::Outcome] }
1406
+
1407
+ # @!attribute channel_name
1408
+ # Human-readable Slack channel name, cached for display in the UI.
1409
+ #
1410
+ # @return [String, nil]
1411
+ optional :channel_name, String, nil?: true
1412
+
1413
+ # @!attribute template
1414
+ # Optional message template. Supports {{summary}}, {{outcome}}, {{phone}},
1415
+ # {{call_url}}, {{assistant_name}}, {{campaign_name}}, {{first_name}},
1416
+ # {{last_name}}, {{email}}, {{company}}, {{contact_name}}, {{contact_line}}, plus
1417
+ # prompt_variables and structured_output keys. When null/empty a default template
1418
+ # is used.
1419
+ #
1420
+ # @return [String, nil]
1421
+ optional :template, String, nil?: true
1422
+
1423
+ # @!method initialize(channel_id:, connection_id:, outcomes:, channel_name: nil, template: nil)
1424
+ # Some parameter documentations has been truncated, see
1425
+ # {Revox::Models::CallCreateResponse::Call::Assistant::Slack} for more details.
1426
+ #
1427
+ # @param channel_id [String] The Slack channel ID where the notification will be posted.
1428
+ #
1429
+ # @param connection_id [String] The Nango connection ID linking the org's Slack workspace to Revox.
1430
+ #
1431
+ # @param outcomes [Array<Symbol, Revox::Models::CallCreateResponse::Call::Assistant::Slack::Outcome>] Which call outcomes trigger a Slack notification (e.g. ['interested', 'none']).
1432
+ #
1433
+ # @param channel_name [String, nil] Human-readable Slack channel name, cached for display in the UI.
1434
+ #
1435
+ # @param template [String, nil] Optional message template. Supports {{summary}}, {{outcome}}, {{phone}},
1436
+ # {{call\_
1437
+
1438
+ module Outcome
1439
+ extend Revox::Internal::Type::Enum
1440
+
1441
+ NOT_INTERESTED = :not_interested
1442
+ INTERESTED = :interested
1443
+ COMPLETED = :completed
1444
+ REQUESTED_CALLBACK_LATER = :requested_callback_later
1445
+ REQUESTED_CALLBACK_NEW_NUMBER = :requested_callback_new_number
1446
+ DO_NOT_CONTACT = :do_not_contact
1447
+ AI_AVERSE = :ai_averse
1448
+ NONE = :none
1449
+
1450
+ # @!method self.values
1451
+ # @return [Array<Symbol>]
1452
+ end
1453
+ end
1454
+
1455
+ class StructuredOutputConfig < Revox::Internal::Type::BaseModel
1456
+ # @!attribute name
1457
+ #
1458
+ # @return [String]
1459
+ required :name, String
1460
+
1461
+ # @!attribute required
1462
+ #
1463
+ # @return [Boolean]
1464
+ required :required, Revox::Internal::Type::Boolean
1465
+
1466
+ # @!attribute type
1467
+ #
1468
+ # @return [Symbol, Revox::Models::CallCreateResponse::Call::Assistant::StructuredOutputConfig::Type]
1469
+ required :type,
1470
+ enum: -> { Revox::Models::CallCreateResponse::Call::Assistant::StructuredOutputConfig::Type }
1471
+
1472
+ # @!attribute description
1473
+ #
1474
+ # @return [String, nil]
1475
+ optional :description, String
1476
+
1477
+ # @!attribute enum_options
1478
+ #
1479
+ # @return [Array<String>, nil]
1480
+ optional :enum_options, Revox::Internal::Type::ArrayOf[String]
1481
+
1482
+ # @!method initialize(name:, required:, type:, description: nil, enum_options: nil)
1483
+ # @param name [String]
1484
+ # @param required [Boolean]
1485
+ # @param type [Symbol, Revox::Models::CallCreateResponse::Call::Assistant::StructuredOutputConfig::Type]
1486
+ # @param description [String]
1487
+ # @param enum_options [Array<String>]
1488
+
1489
+ # @see Revox::Models::CallCreateResponse::Call::Assistant::StructuredOutputConfig#type
1490
+ module Type
1491
+ extend Revox::Internal::Type::Enum
1492
+
1493
+ STRING = :string
1494
+ NUMBER = :number
1495
+ BOOLEAN = :boolean
1496
+ ENUM = :enum
1497
+ DATE = :date
1498
+ DATETIME = :datetime
1499
+
1500
+ # @!method self.values
1501
+ # @return [Array<Symbol>]
1502
+ end
1503
+ end
1504
+
1505
+ # @see Revox::Models::CallCreateResponse::Call::Assistant#stt_context
1506
+ class SttContext < Revox::Internal::Type::BaseModel
1507
+ # @!attribute general
1508
+ #
1509
+ # @return [Array<Revox::Models::CallCreateResponse::Call::Assistant::SttContext::General>]
1510
+ required :general,
1511
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CallCreateResponse::Call::Assistant::SttContext::General] }
1512
+
1513
+ # @!attribute terms
1514
+ #
1515
+ # @return [Array<String>]
1516
+ required :terms, Revox::Internal::Type::ArrayOf[String]
1517
+
1518
+ # @!method initialize(general:, terms:)
1519
+ # Assistant-level speech-to-text context: structured `general` key/value pairs
1520
+ # plus a list of domain `terms`. Prompt-derived context is merged in without
1521
+ # replacing existing entries.
1522
+ #
1523
+ # @param general [Array<Revox::Models::CallCreateResponse::Call::Assistant::SttContext::General>]
1524
+ # @param terms [Array<String>]
1525
+
1526
+ class General < Revox::Internal::Type::BaseModel
1527
+ # @!attribute key
1528
+ #
1529
+ # @return [String]
1530
+ required :key, String
1531
+
1532
+ # @!attribute value
1533
+ #
1534
+ # @return [String]
1535
+ required :value, String
1536
+
1537
+ # @!method initialize(key:, value:)
1538
+ # @param key [String]
1539
+ # @param value [String]
1540
+ end
1541
+ end
1542
+
1543
+ # Transcriber (speech-to-text) model used for the assistant.
1544
+ #
1545
+ # @see Revox::Models::CallCreateResponse::Call::Assistant#stt_model
1546
+ module SttModel
1547
+ extend Revox::Internal::Type::Enum
1548
+
1549
+ STT_RT_V4 = :"stt-rt-v4"
1550
+ STT_RT_V5 = :"stt-rt-v5"
1551
+
1552
+ # @!method self.values
1553
+ # @return [Array<Symbol>]
1554
+ end
1555
+
1556
+ # Audio clip to play while the agent is processing a response. One of the built-in
1557
+ # LiveKit audio clips; null disables it.
1558
+ #
1559
+ # @see Revox::Models::CallCreateResponse::Call::Assistant#thinking_sound
1560
+ module ThinkingSound
1561
+ extend Revox::Internal::Type::Enum
1562
+
1563
+ CITY_AMBIENCE_OGG = :"city-ambience.ogg"
1564
+ FOREST_AMBIENCE_OGG = :"forest-ambience.ogg"
1565
+ OFFICE_AMBIENCE_OGG = :"office-ambience.ogg"
1566
+ CROWDED_ROOM_OGG = :"crowded-room.ogg"
1567
+ KEYBOARD_TYPING_OGG = :"keyboard-typing.ogg"
1568
+ KEYBOARD_TYPING2_OGG = :"keyboard-typing2.ogg"
1569
+ HOLD_MUSIC_OGG = :"hold_music.ogg"
1570
+
1571
+ # @!method self.values
1572
+ # @return [Array<Symbol>]
1573
+ end
1574
+
1575
+ # @see Revox::Models::CallCreateResponse::Call::Assistant#type
1576
+ module Type
1577
+ extend Revox::Internal::Type::Enum
1578
+
1579
+ STANDALONE = :standalone
1580
+ MULTI_STEP = :"multi-step"
1581
+ SUB_ASSISTANT = :"sub-assistant"
1582
+
1583
+ # @!method self.values
1584
+ # @return [Array<Symbol>]
1585
+ end
1586
+
1587
+ # @see Revox::Models::CallCreateResponse::Call::Assistant#voice
1588
+ class Voice < Revox::Internal::Type::BaseModel
1589
+ # @!attribute id
1590
+ # The ID of the voice.
1591
+ #
1592
+ # @return [String]
1593
+ required :id, String
1594
+
1595
+ # @!attribute provider
1596
+ # The provider of the voice.
1597
+ #
1598
+ # @return [Symbol, Revox::Models::CallCreateResponse::Call::Assistant::Voice::Provider]
1599
+ required :provider, enum: -> { Revox::Models::CallCreateResponse::Call::Assistant::Voice::Provider }
1600
+
1601
+ # @!attribute model
1602
+ # Cartesia TTS model (Cartesia only). Defaults to sonic-3 when omitted. Ignored
1603
+ # for other providers.
1604
+ #
1605
+ # @return [Symbol, Revox::Models::CallCreateResponse::Call::Assistant::Voice::Model, nil]
1606
+ optional :model, enum: -> { Revox::Models::CallCreateResponse::Call::Assistant::Voice::Model }
1607
+
1608
+ # @!attribute speed
1609
+ # The speed of the voice. Range depends on provider: Cartesia 0.6–1.5, ElevenLabs
1610
+ # 0.7–1.2. Default is 1.0.
1611
+ #
1612
+ # @return [Float, nil]
1613
+ optional :speed, Float
1614
+
1615
+ # @!attribute volume
1616
+ # Volume of the voice (Cartesia only). 0.5–2.0, default 1.0. Ignored for other
1617
+ # providers.
1618
+ #
1619
+ # @return [Float, nil]
1620
+ optional :volume, Float
1621
+
1622
+ # @!method initialize(id:, provider:, model: nil, speed: nil, volume: nil)
1623
+ # Some parameter documentations has been truncated, see
1624
+ # {Revox::Models::CallCreateResponse::Call::Assistant::Voice} for more details.
1625
+ #
1626
+ # @param id [String] The ID of the voice.
1627
+ #
1628
+ # @param provider [Symbol, Revox::Models::CallCreateResponse::Call::Assistant::Voice::Provider] The provider of the voice.
1629
+ #
1630
+ # @param model [Symbol, Revox::Models::CallCreateResponse::Call::Assistant::Voice::Model] Cartesia TTS model (Cartesia only). Defaults to sonic-3 when omitted. Ignored fo
1631
+ #
1632
+ # @param speed [Float] The speed of the voice. Range depends on provider: Cartesia 0.6–1.5, ElevenLabs
1633
+ #
1634
+ # @param volume [Float] Volume of the voice (Cartesia only). 0.5–2.0, default 1.0. Ignored for other pro
1635
+
1636
+ # The provider of the voice.
1637
+ #
1638
+ # @see Revox::Models::CallCreateResponse::Call::Assistant::Voice#provider
1639
+ module Provider
1640
+ extend Revox::Internal::Type::Enum
1641
+
1642
+ CARTESIA = :cartesia
1643
+ ELEVENLABS = :elevenlabs
1644
+
1645
+ # @!method self.values
1646
+ # @return [Array<Symbol>]
1647
+ end
1648
+
1649
+ # Cartesia TTS model (Cartesia only). Defaults to sonic-3 when omitted. Ignored
1650
+ # for other providers.
1651
+ #
1652
+ # @see Revox::Models::CallCreateResponse::Call::Assistant::Voice#model
1653
+ module Model
1654
+ extend Revox::Internal::Type::Enum
1655
+
1656
+ SONIC_3 = :"sonic-3"
1657
+ SONIC_3_5 = :"sonic-3.5"
1658
+
1659
+ # @!method self.values
1660
+ # @return [Array<Symbol>]
1661
+ end
1662
+ end
1663
+
1664
+ # @see Revox::Models::CallCreateResponse::Call::Assistant#zoho
1665
+ class Zoho < Revox::Internal::Type::BaseModel
1666
+ # @!attribute connection_id
1667
+ # The Nango connection ID linking the org's Zoho CRM account to Revox.
1668
+ #
1669
+ # @return [String]
1670
+ required :connection_id, String
1671
+
1672
+ # @!attribute field_mapping
1673
+ # Maps extracted call fields (structured_output / prompt variables) onto Zoho
1674
+ # field API names on the upserted record.
1675
+ #
1676
+ # @return [Array<Revox::Models::CallCreateResponse::Call::Assistant::Zoho::FieldMapping>]
1677
+ required :field_mapping,
1678
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CallCreateResponse::Call::Assistant::Zoho::FieldMapping] }
1679
+
1680
+ # @!attribute log_call_activity
1681
+ # When true, also log the call as a record in Zoho's Calls module (related to the
1682
+ # upserted prospect via Who_Id).
1683
+ #
1684
+ # @return [Boolean]
1685
+ required :log_call_activity, Revox::Internal::Type::Boolean
1686
+
1687
+ # @!attribute module_
1688
+ # Zoho module the prospect record is upserted into (e.g. 'Leads' or 'Contacts').
1689
+ #
1690
+ # @return [String]
1691
+ required :module_, String, api_name: :module
1692
+
1693
+ # @!attribute outcomes
1694
+ # Which call outcomes trigger the Zoho push (e.g. ['interested', 'none']). Use
1695
+ # 'none' to push when outcome is null.
1696
+ #
1697
+ # @return [Array<Symbol, Revox::Models::CallCreateResponse::Call::Assistant::Zoho::Outcome>]
1698
+ required :outcomes,
1699
+ -> { Revox::Internal::Type::ArrayOf[enum: Revox::Models::CallCreateResponse::Call::Assistant::Zoho::Outcome] }
1700
+
1701
+ # @!attribute template
1702
+ # Optional Note body template. Supports {{summary}}, {{outcome}}, {{phone}},
1703
+ # {{call_url}}, {{assistant_name}}, {{campaign_name}}, {{transcript}}, plus
1704
+ # prompt_variables and structured_output keys. When null/empty a default note
1705
+ # (outcome + summary + auto-listed extracted fields) is used.
1706
+ #
1707
+ # @return [String, nil]
1708
+ optional :template, String, nil?: true
1709
+
1710
+ # @!method initialize(connection_id:, field_mapping:, log_call_activity:, module_:, outcomes:, template: nil)
1711
+ # Some parameter documentations has been truncated, see
1712
+ # {Revox::Models::CallCreateResponse::Call::Assistant::Zoho} for more details.
1713
+ #
1714
+ # @param connection_id [String] The Nango connection ID linking the org's Zoho CRM account to Revox.
1715
+ #
1716
+ # @param field_mapping [Array<Revox::Models::CallCreateResponse::Call::Assistant::Zoho::FieldMapping>] Maps extracted call fields (structured_output / prompt variables) onto Zoho fiel
1717
+ #
1718
+ # @param log_call_activity [Boolean] When true, also log the call as a record in Zoho's Calls module (related to the
1719
+ #
1720
+ # @param module_ [String] Zoho module the prospect record is upserted into (e.g. 'Leads' or 'Contacts').
1721
+ #
1722
+ # @param outcomes [Array<Symbol, Revox::Models::CallCreateResponse::Call::Assistant::Zoho::Outcome>] Which call outcomes trigger the Zoho push (e.g. ['interested', 'none']). Use 'no
1723
+ #
1724
+ # @param template [String, nil] Optional Note body template. Supports {{summary}}, {{outcome}}, {{phone}}, {{cal
1725
+
1726
+ class FieldMapping < Revox::Internal::Type::BaseModel
1727
+ # @!attribute source
1728
+ # Source key to read from the call: a structured_output field name, falling back
1729
+ # to a prompt variable of the same name.
1730
+ #
1731
+ # @return [String]
1732
+ required :source, String
1733
+
1734
+ # @!attribute zoho_field
1735
+ # Destination Zoho field API name on the upserted record (e.g. 'Email', 'Company',
1736
+ # or a custom 'Budget\_\_c').
1737
+ #
1738
+ # @return [String]
1739
+ required :zoho_field, String
1740
+
1741
+ # @!method initialize(source:, zoho_field:)
1742
+ # Some parameter documentations has been truncated, see
1743
+ # {Revox::Models::CallCreateResponse::Call::Assistant::Zoho::FieldMapping} for
1744
+ # more details.
1745
+ #
1746
+ # @param source [String] Source key to read from the call: a structured_output field name, falling back t
1747
+ #
1748
+ # @param zoho_field [String] Destination Zoho field API name on the upserted record (e.g. 'Email', 'Company',
1749
+ end
1750
+
1751
+ module Outcome
1752
+ extend Revox::Internal::Type::Enum
1753
+
1754
+ NOT_INTERESTED = :not_interested
1755
+ INTERESTED = :interested
1756
+ COMPLETED = :completed
1757
+ REQUESTED_CALLBACK_LATER = :requested_callback_later
1758
+ REQUESTED_CALLBACK_NEW_NUMBER = :requested_callback_new_number
1759
+ DO_NOT_CONTACT = :do_not_contact
1760
+ AI_AVERSE = :ai_averse
1761
+ NONE = :none
1762
+
1763
+ # @!method self.values
1764
+ # @return [Array<Symbol>]
1765
+ end
1766
+ end
1767
+
1768
+ # @see Revox::Models::CallCreateResponse::Call::Assistant#created_by
1769
+ class CreatedBy < Revox::Internal::Type::BaseModel
1770
+ # @!attribute id
1771
+ # The database user id of the creator.
1772
+ #
1773
+ # @return [String]
1774
+ required :id, String
1775
+
1776
+ # @!attribute email
1777
+ #
1778
+ # @return [String]
1779
+ required :email, String
1780
+
1781
+ # @!attribute first_name
1782
+ #
1783
+ # @return [String, nil]
1784
+ required :first_name, String, nil?: true
1785
+
1786
+ # @!attribute last_name
1787
+ #
1788
+ # @return [String, nil]
1789
+ required :last_name, String, nil?: true
1790
+
1791
+ # @!method initialize(id:, email:, first_name:, last_name:)
1792
+ # The user who created the assistant.
1793
+ #
1794
+ # @param id [String] The database user id of the creator.
1795
+ #
1796
+ # @param email [String]
1797
+ #
1798
+ # @param first_name [String, nil]
1799
+ #
1800
+ # @param last_name [String, nil]
1801
+ end
1802
+
1803
+ class FaqItem < Revox::Internal::Type::BaseModel
1804
+ # @!attribute answer
1805
+ #
1806
+ # @return [String]
1807
+ required :answer, String
1808
+
1809
+ # @!attribute question
1810
+ #
1811
+ # @return [String]
1812
+ required :question, String
1813
+
1814
+ # @!attribute id
1815
+ #
1816
+ # @return [String, nil]
1817
+ optional :id, String
1818
+
1819
+ # @!attribute needs_human_answer
1820
+ #
1821
+ # @return [Boolean, nil]
1822
+ optional :needs_human_answer, Revox::Internal::Type::Boolean
1823
+
1824
+ # @!attribute source
1825
+ #
1826
+ # @return [Symbol, Revox::Models::CallCreateResponse::Call::Assistant::FaqItem::Source, nil]
1827
+ optional :source, enum: -> { Revox::Models::CallCreateResponse::Call::Assistant::FaqItem::Source }
1828
+
1829
+ # @!method initialize(answer:, question:, id: nil, needs_human_answer: nil, source: nil)
1830
+ # @param answer [String]
1831
+ # @param question [String]
1832
+ # @param id [String]
1833
+ # @param needs_human_answer [Boolean]
1834
+ # @param source [Symbol, Revox::Models::CallCreateResponse::Call::Assistant::FaqItem::Source]
1835
+
1836
+ # @see Revox::Models::CallCreateResponse::Call::Assistant::FaqItem#source
1837
+ module Source
1838
+ extend Revox::Internal::Type::Enum
1839
+
1840
+ HUMAN = :human
1841
+ AI = :ai
1842
+
1843
+ # @!method self.values
1844
+ # @return [Array<Symbol>]
1845
+ end
1846
+ end
1847
+ end
1848
+
1849
+ class CallAttempt < Revox::Internal::Type::BaseModel
1850
+ # @!attribute id
1851
+ # The ID of the call attempt.
1852
+ #
1853
+ # @return [String]
1854
+ required :id, String
1855
+
1856
+ # @!attribute answered_at
1857
+ # The time the call was answered.
1858
+ #
1859
+ # @return [Object]
1860
+ required :answered_at, Revox::Internal::Type::Unknown
1861
+
1862
+ # @!attribute dial_error
1863
+ # The SIP error that occurred.
1864
+ #
1865
+ # @return [Symbol, Revox::Models::CallCreateResponse::Call::CallAttempt::DialError, nil]
1866
+ required :dial_error,
1867
+ enum: -> { Revox::Models::CallCreateResponse::Call::CallAttempt::DialError },
1868
+ nil?: true
1869
+
1870
+ # @!attribute ended_at
1871
+ # The time the call ended.
1872
+ #
1873
+ # @return [Object]
1874
+ required :ended_at, Revox::Internal::Type::Unknown
1875
+
1876
+ # @!attribute phone_number
1877
+ # The phone number that was called. Formatted in E.164 format. Example:
1878
+ # +1234567890
1879
+ #
1880
+ # @return [String]
1881
+ required :phone_number, String
1882
+
1883
+ # @!attribute recording_url
1884
+ # The URL of the audio recording of the call.
1885
+ #
1886
+ # @return [String, nil]
1887
+ required :recording_url, String, nil?: true
1888
+
1889
+ # @!attribute result
1890
+ #
1891
+ # @return [Symbol, Revox::Models::CallCreateResponse::Call::CallAttempt::Result, nil]
1892
+ required :result, enum: -> { Revox::Models::CallCreateResponse::Call::CallAttempt::Result }, nil?: true
1893
+
1894
+ # @!attribute started_at
1895
+ # The time the call started.
1896
+ #
1897
+ # @return [Object]
1898
+ required :started_at, Revox::Internal::Type::Unknown
1899
+
1900
+ # @!attribute status
1901
+ # The status of the call attempt.
1902
+ #
1903
+ # @return [Symbol, Revox::Models::CallCreateResponse::Call::CallAttempt::Status]
1904
+ required :status, enum: -> { Revox::Models::CallCreateResponse::Call::CallAttempt::Status }
1905
+
1906
+ # @!attribute assistants_used
1907
+ # Assistant node ids entered during this attempt, in traversal order.
1908
+ #
1909
+ # @return [Array<String>, nil]
1910
+ optional :assistants_used, Revox::Internal::Type::ArrayOf[String], nil?: true
1911
+
1912
+ # @!attribute end_reason
1913
+ # Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call',
1914
+ # 'voicemail', 'transfer', 'ivr_no_navigate'.
1915
+ #
1916
+ # @return [Symbol, Revox::Models::CallCreateResponse::Call::CallAttempt::EndReason, nil]
1917
+ optional :end_reason,
1918
+ enum: -> { Revox::Models::CallCreateResponse::Call::CallAttempt::EndReason },
1919
+ nil?: true
1920
+
1921
+ # @!attribute ended_by
1922
+ # Who ended the call: 'agent' (AI agent), 'user' (caller/callee hung up), or
1923
+ # 'system' (e.g. max duration limit).
1924
+ #
1925
+ # @return [Symbol, Revox::Models::CallCreateResponse::Call::CallAttempt::EndedBy, nil]
1926
+ optional :ended_by, enum: -> { Revox::Models::CallCreateResponse::Call::CallAttempt::EndedBy }, nil?: true
1927
+
1928
+ # @!attribute post_call_transcript
1929
+ # Higher-quality transcript generated after the call via Soniox async STT. Null
1930
+ # until generated or when no recording is available.
1931
+ #
1932
+ # @return [Array<Revox::Models::CallCreateResponse::Call::CallAttempt::PostCallTranscript>, nil]
1933
+ optional :post_call_transcript,
1934
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CallCreateResponse::Call::CallAttempt::PostCallTranscript] },
1935
+ nil?: true
1936
+
1937
+ # @!attribute sms_log
1938
+ # Automatic SMS sent after the call (voicemail and after-call), ordered oldest
1939
+ # first. The in-call `send_sms` is excluded — it already appears in the transcript
1940
+ # as a tool call.
1941
+ #
1942
+ # @return [Array<Revox::Models::CallCreateResponse::Call::CallAttempt::SMSLog>, nil]
1943
+ optional :sms_log,
1944
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CallCreateResponse::Call::CallAttempt::SMSLog] },
1945
+ nil?: true
1946
+
1947
+ # @!attribute structured_output
1948
+ # The data extracted from the call, using the structured output config from the
1949
+ # parent call object.
1950
+ #
1951
+ # @return [Hash{Symbol=>Object}, nil]
1952
+ optional :structured_output,
1953
+ Revox::Internal::Type::HashOf[Revox::Internal::Type::Unknown],
1954
+ nil?: true
1955
+
1956
+ # @!attribute transcript
1957
+ # The live transcript of the call, built in real time.
1958
+ #
1959
+ # @return [Array<Revox::Models::CallCreateResponse::Call::CallAttempt::Transcript>, nil]
1960
+ optional :transcript,
1961
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CallCreateResponse::Call::CallAttempt::Transcript] },
1962
+ nil?: true
1963
+
1964
+ # @!method initialize(id:, answered_at:, dial_error:, ended_at:, phone_number:, recording_url:, result:, started_at:, status:, assistants_used: nil, end_reason: nil, ended_by: nil, post_call_transcript: nil, sms_log: nil, structured_output: nil, transcript: nil)
1965
+ # Some parameter documentations has been truncated, see
1966
+ # {Revox::Models::CallCreateResponse::Call::CallAttempt} for more details.
1967
+ #
1968
+ # This represent a single call attempt. A call attempt is a single call made to
1969
+ # the phone number.
1970
+ #
1971
+ # @param id [String] The ID of the call attempt.
1972
+ #
1973
+ # @param answered_at [Object] The time the call was answered.
1974
+ #
1975
+ # @param dial_error [Symbol, Revox::Models::CallCreateResponse::Call::CallAttempt::DialError, nil] The SIP error that occurred.
1976
+ #
1977
+ # @param ended_at [Object] The time the call ended.
1978
+ #
1979
+ # @param phone_number [String] The phone number that was called. Formatted in E.164 format. Example: +123456789
1980
+ #
1981
+ # @param recording_url [String, nil] The URL of the audio recording of the call.
1982
+ #
1983
+ # @param result [Symbol, Revox::Models::CallCreateResponse::Call::CallAttempt::Result, nil]
1984
+ #
1985
+ # @param started_at [Object] The time the call started.
1986
+ #
1987
+ # @param status [Symbol, Revox::Models::CallCreateResponse::Call::CallAttempt::Status] The status of the call attempt.
1988
+ #
1989
+ # @param assistants_used [Array<String>, nil] Assistant node ids entered during this attempt, in traversal order.
1990
+ #
1991
+ # @param end_reason [Symbol, Revox::Models::CallCreateResponse::Call::CallAttempt::EndReason, nil] Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call', 'voic
1992
+ #
1993
+ # @param ended_by [Symbol, Revox::Models::CallCreateResponse::Call::CallAttempt::EndedBy, nil] Who ended the call: 'agent' (AI agent), 'user' (caller/callee hung up), or 'syst
1994
+ #
1995
+ # @param post_call_transcript [Array<Revox::Models::CallCreateResponse::Call::CallAttempt::PostCallTranscript>, nil] Higher-quality transcript generated after the call via Soniox async STT. Null un
1996
+ #
1997
+ # @param sms_log [Array<Revox::Models::CallCreateResponse::Call::CallAttempt::SMSLog>, nil] Automatic SMS sent after the call (voicemail and after-call), ordered oldest fir
1998
+ #
1999
+ # @param structured_output [Hash{Symbol=>Object}, nil] The data extracted from the call, using the structured output config from the pa
2000
+ #
2001
+ # @param transcript [Array<Revox::Models::CallCreateResponse::Call::CallAttempt::Transcript>, nil] The live transcript of the call, built in real time.
2002
+
2003
+ # The SIP error that occurred.
2004
+ #
2005
+ # @see Revox::Models::CallCreateResponse::Call::CallAttempt#dial_error
2006
+ module DialError
2007
+ extend Revox::Internal::Type::Enum
2008
+
2009
+ NUMBER_NON_ATTRIBUTED = :number_non_attributed
2010
+ TOO_MANY_CALLS = :too_many_calls
2011
+ BUSY = :busy
2012
+ TEMPORARILY_UNAVAILABLE = :temporarily_unavailable
2013
+ NO_ANSWER = :no_answer
2014
+ NO_INTERNATIONAL_PERMISSION = :no_international_permission
2015
+ PRECONDITION_FAILED = :precondition_failed
2016
+ NON_CLASSIFIED_ERROR = :non_classified_error
2017
+
2018
+ # @!method self.values
2019
+ # @return [Array<Symbol>]
2020
+ end
2021
+
2022
+ # @see Revox::Models::CallCreateResponse::Call::CallAttempt#result
2023
+ module Result
2024
+ extend Revox::Internal::Type::Enum
2025
+
2026
+ IVR = :IVR
2027
+ VOICEMAIL = :voicemail
2028
+ HUMAN = :human
261
2029
  UNKNOWN = :unknown
2030
+ IOS_SCREENING_FILTER = :"ios-screening-filter"
2031
+
2032
+ # @!method self.values
2033
+ # @return [Array<Symbol>]
2034
+ end
2035
+
2036
+ # The status of the call attempt.
2037
+ #
2038
+ # @see Revox::Models::CallCreateResponse::Call::CallAttempt#status
2039
+ module Status
2040
+ extend Revox::Internal::Type::Enum
2041
+
2042
+ QUEUED = :queued
2043
+ RINGING = :ringing
2044
+ ONGOING = :ongoing
2045
+ COMPLETED = :completed
2046
+ ERROR = :error
2047
+
2048
+ # @!method self.values
2049
+ # @return [Array<Symbol>]
2050
+ end
2051
+
2052
+ # Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call',
2053
+ # 'voicemail', 'transfer', 'ivr_no_navigate'.
2054
+ #
2055
+ # @see Revox::Models::CallCreateResponse::Call::CallAttempt#end_reason
2056
+ module EndReason
2057
+ extend Revox::Internal::Type::Enum
2058
+
2059
+ CLIENT_INITIATED = :client_initiated
2060
+ CONNECTION_TIMEOUT = :connection_timeout
2061
+ HUMAN_TAKEOVER = :human_takeover
2062
+ IVR_NO_NAVIGATE = :ivr_no_navigate
2063
+ MAX_DURATION = :max_duration
2064
+ PARTICIPANT_REMOVED = :participant_removed
2065
+ TOOL_END_CALL = :tool_end_call
2066
+ TRANSFER = :transfer
2067
+ USER_INACTIVE = :user_inactive
2068
+ USER_REJECTED = :user_rejected
2069
+ USER_UNAVAILABLE = :user_unavailable
2070
+ VOICEMAIL = :voicemail
2071
+ SPEED_DIAL_ABANDONED = :speed_dial_abandoned
2072
+ SPEED_DIAL_OPERATOR_MISSED = :speed_dial_operator_missed
2073
+ SPEED_DIAL_TIMEOUT = :speed_dial_timeout
2074
+ SPEED_DIAL_HANGUP = :speed_dial_hangup
2075
+
2076
+ # @!method self.values
2077
+ # @return [Array<Symbol>]
2078
+ end
2079
+
2080
+ # Who ended the call: 'agent' (AI agent), 'user' (caller/callee hung up), or
2081
+ # 'system' (e.g. max duration limit).
2082
+ #
2083
+ # @see Revox::Models::CallCreateResponse::Call::CallAttempt#ended_by
2084
+ module EndedBy
2085
+ extend Revox::Internal::Type::Enum
2086
+
2087
+ AGENT = :agent
2088
+ USER = :user
2089
+ SYSTEM = :system
262
2090
 
263
2091
  # @!method self.values
264
2092
  # @return [Array<Symbol>]
265
2093
  end
266
2094
 
267
- # The status of the call attempt.
268
- #
269
- # @see Revox::Models::CallCreateResponse::Call::CallAttempt#status
270
- module Status
271
- extend Revox::Internal::Type::Enum
2095
+ class PostCallTranscript < Revox::Internal::Type::BaseModel
2096
+ # @!attribute content
2097
+ #
2098
+ # @return [String]
2099
+ required :content, String
2100
+
2101
+ # @!attribute role
2102
+ #
2103
+ # @return [Symbol, Revox::Models::CallCreateResponse::Call::CallAttempt::PostCallTranscript::Role]
2104
+ required :role,
2105
+ enum: -> { Revox::Models::CallCreateResponse::Call::CallAttempt::PostCallTranscript::Role }
2106
+
2107
+ # @!attribute tool_arguments
2108
+ #
2109
+ # @return [Hash{Symbol=>Object}, String, nil]
2110
+ optional :tool_arguments,
2111
+ union: -> { Revox::Models::CallCreateResponse::Call::CallAttempt::PostCallTranscript::ToolArguments }
2112
+
2113
+ # @!attribute tool_is_error
2114
+ #
2115
+ # @return [Boolean, nil]
2116
+ optional :tool_is_error, Revox::Internal::Type::Boolean
2117
+
2118
+ # @!attribute tool_name
2119
+ #
2120
+ # @return [String, nil]
2121
+ optional :tool_name, String
2122
+
2123
+ # @!attribute tool_output
2124
+ #
2125
+ # @return [String, nil]
2126
+ optional :tool_output, String
2127
+
2128
+ # @!method initialize(content:, role:, tool_arguments: nil, tool_is_error: nil, tool_name: nil, tool_output: nil)
2129
+ # @param content [String]
2130
+ # @param role [Symbol, Revox::Models::CallCreateResponse::Call::CallAttempt::PostCallTranscript::Role]
2131
+ # @param tool_arguments [Hash{Symbol=>Object}, String]
2132
+ # @param tool_is_error [Boolean]
2133
+ # @param tool_name [String]
2134
+ # @param tool_output [String]
2135
+
2136
+ # @see Revox::Models::CallCreateResponse::Call::CallAttempt::PostCallTranscript#role
2137
+ module Role
2138
+ extend Revox::Internal::Type::Enum
2139
+
2140
+ USER = :user
2141
+ ASSISTANT = :assistant
2142
+ HUMAN_AGENT = :human_agent
2143
+ TOOL = :tool
2144
+
2145
+ # @!method self.values
2146
+ # @return [Array<Symbol>]
2147
+ end
2148
+
2149
+ # @see Revox::Models::CallCreateResponse::Call::CallAttempt::PostCallTranscript#tool_arguments
2150
+ module ToolArguments
2151
+ extend Revox::Internal::Type::Union
2152
+
2153
+ variant -> { Revox::Models::CallCreateResponse::Call::CallAttempt::PostCallTranscript::ToolArguments::UnionMember0Map }
2154
+
2155
+ variant String
2156
+
2157
+ # @!method self.variants
2158
+ # @return [Array(Hash{Symbol=>Object}, String)]
2159
+
2160
+ # @type [Revox::Internal::Type::Converter]
2161
+ UnionMember0Map = Revox::Internal::Type::HashOf[Revox::Internal::Type::Unknown]
2162
+ end
2163
+ end
2164
+
2165
+ class SMSLog < Revox::Internal::Type::BaseModel
2166
+ # @!attribute id
2167
+ #
2168
+ # @return [String]
2169
+ required :id, String
2170
+
2171
+ # @!attribute created_at
2172
+ # When the SMS was sent.
2173
+ #
2174
+ # @return [Object]
2175
+ required :created_at, Revox::Internal::Type::Unknown
2176
+
2177
+ # @!attribute message_body
2178
+ #
2179
+ # @return [String]
2180
+ required :message_body, String
2181
+
2182
+ # @!attribute to_phone_number
2183
+ #
2184
+ # @return [String]
2185
+ required :to_phone_number, String
2186
+
2187
+ # @!attribute twilio_message_sid
2188
+ #
2189
+ # @return [String, nil]
2190
+ required :twilio_message_sid, String, nil?: true
2191
+
2192
+ # @!attribute type
2193
+ #
2194
+ # @return [Symbol, Revox::Models::CallCreateResponse::Call::CallAttempt::SMSLog::Type]
2195
+ required :type, enum: -> { Revox::Models::CallCreateResponse::Call::CallAttempt::SMSLog::Type }
2196
+
2197
+ # @!method initialize(id:, created_at:, message_body:, to_phone_number:, twilio_message_sid:, type:)
2198
+ # @param id [String]
2199
+ #
2200
+ # @param created_at [Object] When the SMS was sent.
2201
+ #
2202
+ # @param message_body [String]
2203
+ #
2204
+ # @param to_phone_number [String]
2205
+ #
2206
+ # @param twilio_message_sid [String, nil]
2207
+ #
2208
+ # @param type [Symbol, Revox::Models::CallCreateResponse::Call::CallAttempt::SMSLog::Type]
2209
+
2210
+ # @see Revox::Models::CallCreateResponse::Call::CallAttempt::SMSLog#type
2211
+ module Type
2212
+ extend Revox::Internal::Type::Enum
272
2213
 
273
- QUEUED = :queued
274
- RINGING = :ringing
275
- ONGOING = :ongoing
276
- COMPLETED = :completed
2214
+ IN_CALL = :in_call
2215
+ VOICEMAIL = :voicemail
2216
+ AFTER_CALL = :after_call
277
2217
 
278
- # @!method self.values
279
- # @return [Array<Symbol>]
2218
+ # @!method self.values
2219
+ # @return [Array<Symbol>]
2220
+ end
280
2221
  end
281
2222
 
282
2223
  class Transcript < Revox::Internal::Type::BaseModel
@@ -306,12 +2247,18 @@ module Revox
306
2247
  # @return [String, nil]
307
2248
  optional :tool_name, String
308
2249
 
309
- # @!method initialize(content:, role:, tool_arguments: nil, tool_is_error: nil, tool_name: nil)
2250
+ # @!attribute tool_output
2251
+ #
2252
+ # @return [String, nil]
2253
+ optional :tool_output, String
2254
+
2255
+ # @!method initialize(content:, role:, tool_arguments: nil, tool_is_error: nil, tool_name: nil, tool_output: nil)
310
2256
  # @param content [String]
311
2257
  # @param role [Symbol, Revox::Models::CallCreateResponse::Call::CallAttempt::Transcript::Role]
312
2258
  # @param tool_arguments [Hash{Symbol=>Object}, String]
313
2259
  # @param tool_is_error [Boolean]
314
2260
  # @param tool_name [String]
2261
+ # @param tool_output [String]
315
2262
 
316
2263
  # @see Revox::Models::CallCreateResponse::Call::CallAttempt::Transcript#role
317
2264
  module Role
@@ -319,6 +2266,7 @@ module Revox
319
2266
 
320
2267
  USER = :user
321
2268
  ASSISTANT = :assistant
2269
+ HUMAN_AGENT = :human_agent
322
2270
  TOOL = :tool
323
2271
 
324
2272
  # @!method self.values
@@ -344,6 +2292,23 @@ module Revox
344
2292
 
345
2293
  # @see Revox::Models::CallCreateResponse::Call#call_retry_config
346
2294
  class CallRetryConfig < Revox::Internal::Type::BaseModel
2295
+ # @!attribute allowed_days
2296
+ # Days of the week when calls are allowed, in the recipient's timezone. Default:
2297
+ # Monday through Friday.
2298
+ #
2299
+ # @return [Array<Symbol, Revox::Models::CallCreateResponse::Call::CallRetryConfig::AllowedDay>]
2300
+ required :allowed_days,
2301
+ -> { Revox::Internal::Type::ArrayOf[enum: Revox::Models::CallCreateResponse::Call::CallRetryConfig::AllowedDay] }
2302
+
2303
+ # @!attribute call_twice_in_a_row
2304
+ # If true and max_retry_attempts >= 2, attempt #2 fires immediately (skipping
2305
+ # retry_delay_seconds) when attempt #1 didn't reach a human.
2306
+ # Calling-window/allowed-days checks still apply. Only affects the 1→2 transition.
2307
+ # Default: false.
2308
+ #
2309
+ # @return [Boolean]
2310
+ required :call_twice_in_a_row, Revox::Internal::Type::Boolean
2311
+
347
2312
  # @!attribute calling_windows
348
2313
  #
349
2314
  # @return [Array<Revox::Models::CallCreateResponse::Call::CallRetryConfig::CallingWindow>]
@@ -364,19 +2329,38 @@ module Revox
364
2329
  # @return [String, nil]
365
2330
  optional :timezone, String, nil?: true
366
2331
 
367
- # @!method initialize(calling_windows:, max_retry_attempts:, timezone: nil)
2332
+ # @!method initialize(allowed_days:, call_twice_in_a_row:, calling_windows:, max_retry_attempts:, timezone: nil)
368
2333
  # Some parameter documentations has been truncated, see
369
2334
  # {Revox::Models::CallCreateResponse::Call::CallRetryConfig} for more details.
370
2335
  #
371
2336
  # Configuration for call retry behavior including time windows, delays, and max
372
2337
  # iterations. If not provided, defaults will be used.
373
2338
  #
2339
+ # @param allowed_days [Array<Symbol, Revox::Models::CallCreateResponse::Call::CallRetryConfig::AllowedDay>] Days of the week when calls are allowed, in the recipient's timezone. Default: M
2340
+ #
2341
+ # @param call_twice_in_a_row [Boolean] If true and max_retry_attempts >= 2, attempt #2 fires immediately (skipping retr
2342
+ #
374
2343
  # @param calling_windows [Array<Revox::Models::CallCreateResponse::Call::CallRetryConfig::CallingWindow>]
375
2344
  #
376
2345
  # @param max_retry_attempts [Integer] Maximum number of call retry attempts. Default: 3.
377
2346
  #
378
2347
  # @param timezone [String, nil] Optional IANA timezone identifier to override the automatic timezone detection f
379
2348
 
2349
+ module AllowedDay
2350
+ extend Revox::Internal::Type::Enum
2351
+
2352
+ MONDAY = :monday
2353
+ TUESDAY = :tuesday
2354
+ WEDNESDAY = :wednesday
2355
+ THURSDAY = :thursday
2356
+ FRIDAY = :friday
2357
+ SATURDAY = :saturday
2358
+ SUNDAY = :sunday
2359
+
2360
+ # @!method self.values
2361
+ # @return [Array<Symbol>]
2362
+ end
2363
+
380
2364
  class CallingWindow < Revox::Internal::Type::BaseModel
381
2365
  # @!attribute calling_window_end_time
382
2366
  # End time for the calling window in the recipient's timezone (or
@@ -413,6 +2397,55 @@ module Revox
413
2397
  end
414
2398
  end
415
2399
 
2400
+ # @see Revox::Models::CallCreateResponse::Call#campaign
2401
+ class Campaign < Revox::Internal::Type::BaseModel
2402
+ # @!attribute id
2403
+ #
2404
+ # @return [String]
2405
+ required :id, String
2406
+
2407
+ # @!attribute name
2408
+ #
2409
+ # @return [String]
2410
+ required :name, String
2411
+
2412
+ # @!method initialize(id:, name:)
2413
+ # @param id [String]
2414
+ # @param name [String]
2415
+ end
2416
+
2417
+ # @see Revox::Models::CallCreateResponse::Call#contact
2418
+ class Contact < Revox::Internal::Type::BaseModel
2419
+ # @!attribute company
2420
+ #
2421
+ # @return [String, nil]
2422
+ required :company, String, nil?: true
2423
+
2424
+ # @!attribute email
2425
+ #
2426
+ # @return [String, nil]
2427
+ required :email, String, nil?: true
2428
+
2429
+ # @!attribute first_name
2430
+ #
2431
+ # @return [String, nil]
2432
+ required :first_name, String, nil?: true
2433
+
2434
+ # @!attribute last_name
2435
+ #
2436
+ # @return [String, nil]
2437
+ required :last_name, String, nil?: true
2438
+
2439
+ # @!method initialize(company:, email:, first_name:, last_name:)
2440
+ # Magic contact variables (prospect identity) extracted from the call's input data
2441
+ # and transcript.
2442
+ #
2443
+ # @param company [String, nil]
2444
+ # @param email [String, nil]
2445
+ # @param first_name [String, nil]
2446
+ # @param last_name [String, nil]
2447
+ end
2448
+
416
2449
  # Whether the call is inbound or outbound.
417
2450
  #
418
2451
  # @see Revox::Models::CallCreateResponse::Call#direction
@@ -440,6 +2473,14 @@ module Revox
440
2473
  # @return [Object]
441
2474
  required :answered_at, Revox::Internal::Type::Unknown
442
2475
 
2476
+ # @!attribute dial_error
2477
+ # The SIP error that occurred.
2478
+ #
2479
+ # @return [Symbol, Revox::Models::CallCreateResponse::Call::LastCallAttempt::DialError, nil]
2480
+ required :dial_error,
2481
+ enum: -> { Revox::Models::CallCreateResponse::Call::LastCallAttempt::DialError },
2482
+ nil?: true
2483
+
443
2484
  # @!attribute ended_at
444
2485
  # The time the call ended.
445
2486
  #
@@ -478,6 +2519,49 @@ module Revox
478
2519
  # @return [Symbol, Revox::Models::CallCreateResponse::Call::LastCallAttempt::Status]
479
2520
  required :status, enum: -> { Revox::Models::CallCreateResponse::Call::LastCallAttempt::Status }
480
2521
 
2522
+ # @!attribute assistants_used
2523
+ # Assistant node ids entered during this attempt, in traversal order.
2524
+ #
2525
+ # @return [Array<String>, nil]
2526
+ optional :assistants_used, Revox::Internal::Type::ArrayOf[String], nil?: true
2527
+
2528
+ # @!attribute end_reason
2529
+ # Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call',
2530
+ # 'voicemail', 'transfer', 'ivr_no_navigate'.
2531
+ #
2532
+ # @return [Symbol, Revox::Models::CallCreateResponse::Call::LastCallAttempt::EndReason, nil]
2533
+ optional :end_reason,
2534
+ enum: -> { Revox::Models::CallCreateResponse::Call::LastCallAttempt::EndReason },
2535
+ nil?: true
2536
+
2537
+ # @!attribute ended_by
2538
+ # Who ended the call: 'agent' (AI agent), 'user' (caller/callee hung up), or
2539
+ # 'system' (e.g. max duration limit).
2540
+ #
2541
+ # @return [Symbol, Revox::Models::CallCreateResponse::Call::LastCallAttempt::EndedBy, nil]
2542
+ optional :ended_by,
2543
+ enum: -> { Revox::Models::CallCreateResponse::Call::LastCallAttempt::EndedBy },
2544
+ nil?: true
2545
+
2546
+ # @!attribute post_call_transcript
2547
+ # Higher-quality transcript generated after the call via Soniox async STT. Null
2548
+ # until generated or when no recording is available.
2549
+ #
2550
+ # @return [Array<Revox::Models::CallCreateResponse::Call::LastCallAttempt::PostCallTranscript>, nil]
2551
+ optional :post_call_transcript,
2552
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CallCreateResponse::Call::LastCallAttempt::PostCallTranscript] },
2553
+ nil?: true
2554
+
2555
+ # @!attribute sms_log
2556
+ # Automatic SMS sent after the call (voicemail and after-call), ordered oldest
2557
+ # first. The in-call `send_sms` is excluded — it already appears in the transcript
2558
+ # as a tool call.
2559
+ #
2560
+ # @return [Array<Revox::Models::CallCreateResponse::Call::LastCallAttempt::SMSLog>, nil]
2561
+ optional :sms_log,
2562
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CallCreateResponse::Call::LastCallAttempt::SMSLog] },
2563
+ nil?: true
2564
+
481
2565
  # @!attribute structured_output
482
2566
  # The data extracted from the call, using the structured output config from the
483
2567
  # parent call object.
@@ -488,14 +2572,14 @@ module Revox
488
2572
  nil?: true
489
2573
 
490
2574
  # @!attribute transcript
491
- # The transcript of the call.
2575
+ # The live transcript of the call, built in real time.
492
2576
  #
493
2577
  # @return [Array<Revox::Models::CallCreateResponse::Call::LastCallAttempt::Transcript>, nil]
494
2578
  optional :transcript,
495
2579
  -> { Revox::Internal::Type::ArrayOf[Revox::Models::CallCreateResponse::Call::LastCallAttempt::Transcript] },
496
2580
  nil?: true
497
2581
 
498
- # @!method initialize(id:, answered_at:, ended_at:, phone_number:, recording_url:, result:, started_at:, status:, structured_output: nil, transcript: nil)
2582
+ # @!method initialize(id:, answered_at:, dial_error:, ended_at:, phone_number:, recording_url:, result:, started_at:, status:, assistants_used: nil, end_reason: nil, ended_by: nil, post_call_transcript: nil, sms_log: nil, structured_output: nil, transcript: nil)
499
2583
  # Some parameter documentations has been truncated, see
500
2584
  # {Revox::Models::CallCreateResponse::Call::LastCallAttempt} for more details.
501
2585
  #
@@ -506,6 +2590,8 @@ module Revox
506
2590
  #
507
2591
  # @param answered_at [Object] The time the call was answered.
508
2592
  #
2593
+ # @param dial_error [Symbol, Revox::Models::CallCreateResponse::Call::LastCallAttempt::DialError, nil] The SIP error that occurred.
2594
+ #
509
2595
  # @param ended_at [Object] The time the call ended.
510
2596
  #
511
2597
  # @param phone_number [String] The phone number that was called. Formatted in E.164 format. Example: +123456789
@@ -518,9 +2604,38 @@ module Revox
518
2604
  #
519
2605
  # @param status [Symbol, Revox::Models::CallCreateResponse::Call::LastCallAttempt::Status] The status of the call attempt.
520
2606
  #
2607
+ # @param assistants_used [Array<String>, nil] Assistant node ids entered during this attempt, in traversal order.
2608
+ #
2609
+ # @param end_reason [Symbol, Revox::Models::CallCreateResponse::Call::LastCallAttempt::EndReason, nil] Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call', 'voic
2610
+ #
2611
+ # @param ended_by [Symbol, Revox::Models::CallCreateResponse::Call::LastCallAttempt::EndedBy, nil] Who ended the call: 'agent' (AI agent), 'user' (caller/callee hung up), or 'syst
2612
+ #
2613
+ # @param post_call_transcript [Array<Revox::Models::CallCreateResponse::Call::LastCallAttempt::PostCallTranscript>, nil] Higher-quality transcript generated after the call via Soniox async STT. Null un
2614
+ #
2615
+ # @param sms_log [Array<Revox::Models::CallCreateResponse::Call::LastCallAttempt::SMSLog>, nil] Automatic SMS sent after the call (voicemail and after-call), ordered oldest fir
2616
+ #
521
2617
  # @param structured_output [Hash{Symbol=>Object}, nil] The data extracted from the call, using the structured output config from the pa
522
2618
  #
523
- # @param transcript [Array<Revox::Models::CallCreateResponse::Call::LastCallAttempt::Transcript>, nil] The transcript of the call.
2619
+ # @param transcript [Array<Revox::Models::CallCreateResponse::Call::LastCallAttempt::Transcript>, nil] The live transcript of the call, built in real time.
2620
+
2621
+ # The SIP error that occurred.
2622
+ #
2623
+ # @see Revox::Models::CallCreateResponse::Call::LastCallAttempt#dial_error
2624
+ module DialError
2625
+ extend Revox::Internal::Type::Enum
2626
+
2627
+ NUMBER_NON_ATTRIBUTED = :number_non_attributed
2628
+ TOO_MANY_CALLS = :too_many_calls
2629
+ BUSY = :busy
2630
+ TEMPORARILY_UNAVAILABLE = :temporarily_unavailable
2631
+ NO_ANSWER = :no_answer
2632
+ NO_INTERNATIONAL_PERMISSION = :no_international_permission
2633
+ PRECONDITION_FAILED = :precondition_failed
2634
+ NON_CLASSIFIED_ERROR = :non_classified_error
2635
+
2636
+ # @!method self.values
2637
+ # @return [Array<Symbol>]
2638
+ end
524
2639
 
525
2640
  # @see Revox::Models::CallCreateResponse::Call::LastCallAttempt#result
526
2641
  module Result
@@ -530,6 +2645,7 @@ module Revox
530
2645
  VOICEMAIL = :voicemail
531
2646
  HUMAN = :human
532
2647
  UNKNOWN = :unknown
2648
+ IOS_SCREENING_FILTER = :"ios-screening-filter"
533
2649
 
534
2650
  # @!method self.values
535
2651
  # @return [Array<Symbol>]
@@ -545,11 +2661,183 @@ module Revox
545
2661
  RINGING = :ringing
546
2662
  ONGOING = :ongoing
547
2663
  COMPLETED = :completed
2664
+ ERROR = :error
2665
+
2666
+ # @!method self.values
2667
+ # @return [Array<Symbol>]
2668
+ end
2669
+
2670
+ # Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call',
2671
+ # 'voicemail', 'transfer', 'ivr_no_navigate'.
2672
+ #
2673
+ # @see Revox::Models::CallCreateResponse::Call::LastCallAttempt#end_reason
2674
+ module EndReason
2675
+ extend Revox::Internal::Type::Enum
2676
+
2677
+ CLIENT_INITIATED = :client_initiated
2678
+ CONNECTION_TIMEOUT = :connection_timeout
2679
+ HUMAN_TAKEOVER = :human_takeover
2680
+ IVR_NO_NAVIGATE = :ivr_no_navigate
2681
+ MAX_DURATION = :max_duration
2682
+ PARTICIPANT_REMOVED = :participant_removed
2683
+ TOOL_END_CALL = :tool_end_call
2684
+ TRANSFER = :transfer
2685
+ USER_INACTIVE = :user_inactive
2686
+ USER_REJECTED = :user_rejected
2687
+ USER_UNAVAILABLE = :user_unavailable
2688
+ VOICEMAIL = :voicemail
2689
+ SPEED_DIAL_ABANDONED = :speed_dial_abandoned
2690
+ SPEED_DIAL_OPERATOR_MISSED = :speed_dial_operator_missed
2691
+ SPEED_DIAL_TIMEOUT = :speed_dial_timeout
2692
+ SPEED_DIAL_HANGUP = :speed_dial_hangup
2693
+
2694
+ # @!method self.values
2695
+ # @return [Array<Symbol>]
2696
+ end
2697
+
2698
+ # Who ended the call: 'agent' (AI agent), 'user' (caller/callee hung up), or
2699
+ # 'system' (e.g. max duration limit).
2700
+ #
2701
+ # @see Revox::Models::CallCreateResponse::Call::LastCallAttempt#ended_by
2702
+ module EndedBy
2703
+ extend Revox::Internal::Type::Enum
2704
+
2705
+ AGENT = :agent
2706
+ USER = :user
2707
+ SYSTEM = :system
548
2708
 
549
2709
  # @!method self.values
550
2710
  # @return [Array<Symbol>]
551
2711
  end
552
2712
 
2713
+ class PostCallTranscript < Revox::Internal::Type::BaseModel
2714
+ # @!attribute content
2715
+ #
2716
+ # @return [String]
2717
+ required :content, String
2718
+
2719
+ # @!attribute role
2720
+ #
2721
+ # @return [Symbol, Revox::Models::CallCreateResponse::Call::LastCallAttempt::PostCallTranscript::Role]
2722
+ required :role,
2723
+ enum: -> { Revox::Models::CallCreateResponse::Call::LastCallAttempt::PostCallTranscript::Role }
2724
+
2725
+ # @!attribute tool_arguments
2726
+ #
2727
+ # @return [Hash{Symbol=>Object}, String, nil]
2728
+ optional :tool_arguments,
2729
+ union: -> { Revox::Models::CallCreateResponse::Call::LastCallAttempt::PostCallTranscript::ToolArguments }
2730
+
2731
+ # @!attribute tool_is_error
2732
+ #
2733
+ # @return [Boolean, nil]
2734
+ optional :tool_is_error, Revox::Internal::Type::Boolean
2735
+
2736
+ # @!attribute tool_name
2737
+ #
2738
+ # @return [String, nil]
2739
+ optional :tool_name, String
2740
+
2741
+ # @!attribute tool_output
2742
+ #
2743
+ # @return [String, nil]
2744
+ optional :tool_output, String
2745
+
2746
+ # @!method initialize(content:, role:, tool_arguments: nil, tool_is_error: nil, tool_name: nil, tool_output: nil)
2747
+ # @param content [String]
2748
+ # @param role [Symbol, Revox::Models::CallCreateResponse::Call::LastCallAttempt::PostCallTranscript::Role]
2749
+ # @param tool_arguments [Hash{Symbol=>Object}, String]
2750
+ # @param tool_is_error [Boolean]
2751
+ # @param tool_name [String]
2752
+ # @param tool_output [String]
2753
+
2754
+ # @see Revox::Models::CallCreateResponse::Call::LastCallAttempt::PostCallTranscript#role
2755
+ module Role
2756
+ extend Revox::Internal::Type::Enum
2757
+
2758
+ USER = :user
2759
+ ASSISTANT = :assistant
2760
+ HUMAN_AGENT = :human_agent
2761
+ TOOL = :tool
2762
+
2763
+ # @!method self.values
2764
+ # @return [Array<Symbol>]
2765
+ end
2766
+
2767
+ # @see Revox::Models::CallCreateResponse::Call::LastCallAttempt::PostCallTranscript#tool_arguments
2768
+ module ToolArguments
2769
+ extend Revox::Internal::Type::Union
2770
+
2771
+ variant -> { Revox::Models::CallCreateResponse::Call::LastCallAttempt::PostCallTranscript::ToolArguments::UnionMember0Map }
2772
+
2773
+ variant String
2774
+
2775
+ # @!method self.variants
2776
+ # @return [Array(Hash{Symbol=>Object}, String)]
2777
+
2778
+ # @type [Revox::Internal::Type::Converter]
2779
+ UnionMember0Map = Revox::Internal::Type::HashOf[Revox::Internal::Type::Unknown]
2780
+ end
2781
+ end
2782
+
2783
+ class SMSLog < Revox::Internal::Type::BaseModel
2784
+ # @!attribute id
2785
+ #
2786
+ # @return [String]
2787
+ required :id, String
2788
+
2789
+ # @!attribute created_at
2790
+ # When the SMS was sent.
2791
+ #
2792
+ # @return [Object]
2793
+ required :created_at, Revox::Internal::Type::Unknown
2794
+
2795
+ # @!attribute message_body
2796
+ #
2797
+ # @return [String]
2798
+ required :message_body, String
2799
+
2800
+ # @!attribute to_phone_number
2801
+ #
2802
+ # @return [String]
2803
+ required :to_phone_number, String
2804
+
2805
+ # @!attribute twilio_message_sid
2806
+ #
2807
+ # @return [String, nil]
2808
+ required :twilio_message_sid, String, nil?: true
2809
+
2810
+ # @!attribute type
2811
+ #
2812
+ # @return [Symbol, Revox::Models::CallCreateResponse::Call::LastCallAttempt::SMSLog::Type]
2813
+ required :type, enum: -> { Revox::Models::CallCreateResponse::Call::LastCallAttempt::SMSLog::Type }
2814
+
2815
+ # @!method initialize(id:, created_at:, message_body:, to_phone_number:, twilio_message_sid:, type:)
2816
+ # @param id [String]
2817
+ #
2818
+ # @param created_at [Object] When the SMS was sent.
2819
+ #
2820
+ # @param message_body [String]
2821
+ #
2822
+ # @param to_phone_number [String]
2823
+ #
2824
+ # @param twilio_message_sid [String, nil]
2825
+ #
2826
+ # @param type [Symbol, Revox::Models::CallCreateResponse::Call::LastCallAttempt::SMSLog::Type]
2827
+
2828
+ # @see Revox::Models::CallCreateResponse::Call::LastCallAttempt::SMSLog#type
2829
+ module Type
2830
+ extend Revox::Internal::Type::Enum
2831
+
2832
+ IN_CALL = :in_call
2833
+ VOICEMAIL = :voicemail
2834
+ AFTER_CALL = :after_call
2835
+
2836
+ # @!method self.values
2837
+ # @return [Array<Symbol>]
2838
+ end
2839
+ end
2840
+
553
2841
  class Transcript < Revox::Internal::Type::BaseModel
554
2842
  # @!attribute content
555
2843
  #
@@ -577,12 +2865,18 @@ module Revox
577
2865
  # @return [String, nil]
578
2866
  optional :tool_name, String
579
2867
 
580
- # @!method initialize(content:, role:, tool_arguments: nil, tool_is_error: nil, tool_name: nil)
2868
+ # @!attribute tool_output
2869
+ #
2870
+ # @return [String, nil]
2871
+ optional :tool_output, String
2872
+
2873
+ # @!method initialize(content:, role:, tool_arguments: nil, tool_is_error: nil, tool_name: nil, tool_output: nil)
581
2874
  # @param content [String]
582
2875
  # @param role [Symbol, Revox::Models::CallCreateResponse::Call::LastCallAttempt::Transcript::Role]
583
2876
  # @param tool_arguments [Hash{Symbol=>Object}, String]
584
2877
  # @param tool_is_error [Boolean]
585
2878
  # @param tool_name [String]
2879
+ # @param tool_output [String]
586
2880
 
587
2881
  # @see Revox::Models::CallCreateResponse::Call::LastCallAttempt::Transcript#role
588
2882
  module Role
@@ -590,6 +2884,7 @@ module Revox
590
2884
 
591
2885
  USER = :user
592
2886
  ASSISTANT = :assistant
2887
+ HUMAN_AGENT = :human_agent
593
2888
  TOOL = :tool
594
2889
 
595
2890
  # @!method self.values
@@ -621,6 +2916,10 @@ module Revox
621
2916
 
622
2917
  variant -> { Revox::Models::CallCreateResponse::Call::LlmModel::UnionMember1 }
623
2918
 
2919
+ variant -> { Revox::Models::CallCreateResponse::Call::LlmModel::UnionMember2 }
2920
+
2921
+ variant -> { Revox::Models::CallCreateResponse::Call::LlmModel::UnionMember3 }
2922
+
624
2923
  class UnionMember0 < Revox::Internal::Type::BaseModel
625
2924
  # @!attribute name
626
2925
  #
@@ -675,8 +2974,129 @@ module Revox
675
2974
  # @param type [Symbol, :openrouter] Use a model from OpenRouter.
676
2975
  end
677
2976
 
2977
+ class UnionMember2 < Revox::Internal::Type::BaseModel
2978
+ # @!attribute api_key
2979
+ # API key sent as Bearer token to the custom endpoint.
2980
+ #
2981
+ # @return [String]
2982
+ required :api_key, String
2983
+
2984
+ # @!attribute api_url
2985
+ # Base URL for the OpenAI-compatible API, e.g. https://api.together.xyz/v1
2986
+ #
2987
+ # @return [String]
2988
+ required :api_url, String
2989
+
2990
+ # @!attribute model_name
2991
+ # Model name as expected by the provider, e.g. meta-llama/llama-3-70b
2992
+ #
2993
+ # @return [String]
2994
+ required :model_name, String
2995
+
2996
+ # @!attribute type
2997
+ # OpenAI-compatible chat completions API (bring your own endpoint and key).
2998
+ #
2999
+ # @return [Symbol, :custom]
3000
+ required :type, const: :custom
3001
+
3002
+ # @!method initialize(api_key:, api_url:, model_name:, type: :custom)
3003
+ # @param api_key [String] API key sent as Bearer token to the custom endpoint.
3004
+ #
3005
+ # @param api_url [String] Base URL for the OpenAI-compatible API, e.g. https://api.together.xyz/v1
3006
+ #
3007
+ # @param model_name [String] Model name as expected by the provider, e.g. meta-llama/llama-3-70b
3008
+ #
3009
+ # @param type [Symbol, :custom] OpenAI-compatible chat completions API (bring your own endpoint and key).
3010
+ end
3011
+
3012
+ class UnionMember3 < Revox::Internal::Type::BaseModel
3013
+ # @!attribute provider
3014
+ # The provider to use from Realtime. eg: openai, google.
3015
+ #
3016
+ # @return [Symbol, Revox::Models::CallCreateResponse::Call::LlmModel::UnionMember3::Provider]
3017
+ required :provider, enum: -> { Revox::Models::CallCreateResponse::Call::LlmModel::UnionMember3::Provider }
3018
+
3019
+ # @!attribute realtime_model_id
3020
+ # The model ID to use from Realtime. eg: gpt-4.1
3021
+ #
3022
+ # @return [String]
3023
+ required :realtime_model_id, String
3024
+
3025
+ # @!attribute type
3026
+ # Use a model from Realtime.
3027
+ #
3028
+ # @return [Symbol, :realtime]
3029
+ required :type, const: :realtime
3030
+
3031
+ # @!attribute realtime_voice_id
3032
+ # Output voice for the realtime provider (e.g. OpenAI: marin; Gemini: Puck).
3033
+ #
3034
+ # @return [String, nil]
3035
+ optional :realtime_voice_id, String
3036
+
3037
+ # @!method initialize(provider:, realtime_model_id:, realtime_voice_id: nil, type: :realtime)
3038
+ # @param provider [Symbol, Revox::Models::CallCreateResponse::Call::LlmModel::UnionMember3::Provider] The provider to use from Realtime. eg: openai, google.
3039
+ #
3040
+ # @param realtime_model_id [String] The model ID to use from Realtime. eg: gpt-4.1
3041
+ #
3042
+ # @param realtime_voice_id [String] Output voice for the realtime provider (e.g. OpenAI: marin; Gemini: Puck).
3043
+ #
3044
+ # @param type [Symbol, :realtime] Use a model from Realtime.
3045
+
3046
+ # The provider to use from Realtime. eg: openai, google.
3047
+ #
3048
+ # @see Revox::Models::CallCreateResponse::Call::LlmModel::UnionMember3#provider
3049
+ module Provider
3050
+ extend Revox::Internal::Type::Enum
3051
+
3052
+ OPENAI = :openai
3053
+ GOOGLE = :google
3054
+
3055
+ # @!method self.values
3056
+ # @return [Array<Symbol>]
3057
+ end
3058
+ end
3059
+
678
3060
  # @!method self.variants
679
- # @return [Array(Revox::Models::CallCreateResponse::Call::LlmModel::UnionMember0, Revox::Models::CallCreateResponse::Call::LlmModel::UnionMember1)]
3061
+ # @return [Array(Revox::Models::CallCreateResponse::Call::LlmModel::UnionMember0, Revox::Models::CallCreateResponse::Call::LlmModel::UnionMember1, Revox::Models::CallCreateResponse::Call::LlmModel::UnionMember2, Revox::Models::CallCreateResponse::Call::LlmModel::UnionMember3)]
3062
+ end
3063
+
3064
+ # The status of the call.
3065
+ #
3066
+ # @see Revox::Models::CallCreateResponse::Call#status
3067
+ module Status
3068
+ extend Revox::Internal::Type::Enum
3069
+
3070
+ INITIALIZING = :initializing
3071
+ QUEUED_FOR_CALLING = :queued_for_calling
3072
+ CALLING = :calling
3073
+ POST_PROCESSING = :post_processing
3074
+ SCHEDULED = :scheduled
3075
+ PAUSED = :paused
3076
+ COMPLETED = :completed
3077
+ CANCELLED = :cancelled
3078
+ ERRORED = :errored
3079
+
3080
+ # @!method self.values
3081
+ # @return [Array<Symbol>]
3082
+ end
3083
+
3084
+ # Business outcome of the call. Null if not computed or no transcript.
3085
+ #
3086
+ # @see Revox::Models::CallCreateResponse::Call#outcome
3087
+ module Outcome
3088
+ extend Revox::Internal::Type::Enum
3089
+
3090
+ NOT_INTERESTED = :not_interested
3091
+ INTERESTED = :interested
3092
+ COMPLETED = :completed
3093
+ REQUESTED_CALLBACK_LATER = :requested_callback_later
3094
+ REQUESTED_CALLBACK_NEW_NUMBER = :requested_callback_new_number
3095
+ DO_NOT_CONTACT = :do_not_contact
3096
+ AI_AVERSE = :ai_averse
3097
+
3098
+ # @!method self.values
3099
+ # @return [Array<Symbol>]
680
3100
  end
681
3101
  end
682
3102
  end