revox 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3903 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Revox
4
+ module Models
5
+ # @see Revox::Resources::Campaigns#launch
6
+ class CampaignLaunchResponse < Revox::Internal::Type::BaseModel
7
+ # @!attribute launched
8
+ #
9
+ # @return [Float]
10
+ required :launched, Float
11
+
12
+ # @!attribute skipped
13
+ #
14
+ # @return [Revox::Models::CampaignLaunchResponse::Skipped]
15
+ required :skipped, -> { Revox::Models::CampaignLaunchResponse::Skipped }
16
+
17
+ # @!attribute session
18
+ #
19
+ # @return [Revox::Models::CampaignLaunchResponse::Session, nil]
20
+ optional :session, -> { Revox::Models::CampaignLaunchResponse::Session }
21
+
22
+ # @!method initialize(launched:, skipped:, session: nil)
23
+ # @param launched [Float]
24
+ # @param skipped [Revox::Models::CampaignLaunchResponse::Skipped]
25
+ # @param session [Revox::Models::CampaignLaunchResponse::Session]
26
+
27
+ # @see Revox::Models::CampaignLaunchResponse#skipped
28
+ class Skipped < Revox::Internal::Type::BaseModel
29
+ # @!attribute active
30
+ #
31
+ # @return [Float]
32
+ required :active, Float
33
+
34
+ # @!attribute attempts_exhausted
35
+ #
36
+ # @return [Float]
37
+ required :attempts_exhausted, Float
38
+
39
+ # @!attribute cancelled
40
+ #
41
+ # @return [Float]
42
+ required :cancelled, Float
43
+
44
+ # @!method initialize(active:, attempts_exhausted:, cancelled:)
45
+ # @param active [Float]
46
+ # @param attempts_exhausted [Float]
47
+ # @param cancelled [Float]
48
+ end
49
+
50
+ # @see Revox::Models::CampaignLaunchResponse#session
51
+ class Session < Revox::Internal::Type::BaseModel
52
+ # @!attribute id
53
+ #
54
+ # @return [String]
55
+ required :id, String
56
+
57
+ # @!attribute campaign_id
58
+ #
59
+ # @return [String]
60
+ required :campaign_id, String
61
+
62
+ # @!attribute connected_count
63
+ #
64
+ # @return [Float]
65
+ required :connected_count, Float
66
+
67
+ # @!attribute created_at
68
+ #
69
+ # @return [Time, Object]
70
+ required :created_at, union: -> { Revox::Models::CampaignLaunchResponse::Session::CreatedAt }
71
+
72
+ # @!attribute current_call_id
73
+ #
74
+ # @return [String, nil]
75
+ required :current_call_id, String, nil?: true
76
+
77
+ # @!attribute dialed_count
78
+ #
79
+ # @return [Float]
80
+ required :dialed_count, Float
81
+
82
+ # @!attribute ended_at
83
+ #
84
+ # @return [Time, Object, nil]
85
+ required :ended_at, union: -> { Revox::Models::CampaignLaunchResponse::Session::EndedAt }, nil?: true
86
+
87
+ # @!attribute in_flight_calls
88
+ #
89
+ # @return [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall>]
90
+ required :in_flight_calls,
91
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CampaignLaunchResponse::Session::InFlightCall] }
92
+
93
+ # @!attribute outcome_filter
94
+ #
95
+ # @return [Array<Symbol, Revox::Models::CampaignLaunchResponse::Session::OutcomeFilter>]
96
+ required :outcome_filter,
97
+ -> { Revox::Internal::Type::ArrayOf[enum: Revox::Models::CampaignLaunchResponse::Session::OutcomeFilter] }
98
+
99
+ # @!attribute status
100
+ #
101
+ # @return [Symbol, Revox::Models::CampaignLaunchResponse::Session::Status]
102
+ required :status, enum: -> { Revox::Models::CampaignLaunchResponse::Session::Status }
103
+
104
+ # @!attribute total_targets
105
+ #
106
+ # @return [Float]
107
+ required :total_targets, Float
108
+
109
+ # @!method initialize(id:, campaign_id:, connected_count:, created_at:, current_call_id:, dialed_count:, ended_at:, in_flight_calls:, outcome_filter:, status:, total_targets:)
110
+ # @param id [String]
111
+ # @param campaign_id [String]
112
+ # @param connected_count [Float]
113
+ # @param created_at [Time, Object]
114
+ # @param current_call_id [String, nil]
115
+ # @param dialed_count [Float]
116
+ # @param ended_at [Time, Object, nil]
117
+ # @param in_flight_calls [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall>]
118
+ # @param outcome_filter [Array<Symbol, Revox::Models::CampaignLaunchResponse::Session::OutcomeFilter>]
119
+ # @param status [Symbol, Revox::Models::CampaignLaunchResponse::Session::Status]
120
+ # @param total_targets [Float]
121
+
122
+ # @see Revox::Models::CampaignLaunchResponse::Session#created_at
123
+ module CreatedAt
124
+ extend Revox::Internal::Type::Union
125
+
126
+ variant Time
127
+
128
+ variant Revox::Internal::Type::Unknown
129
+
130
+ # @!method self.variants
131
+ # @return [Array(Time, Object)]
132
+ end
133
+
134
+ # @see Revox::Models::CampaignLaunchResponse::Session#ended_at
135
+ module EndedAt
136
+ extend Revox::Internal::Type::Union
137
+
138
+ variant Time
139
+
140
+ variant Revox::Internal::Type::Unknown
141
+
142
+ # @!method self.variants
143
+ # @return [Array(Time, Object)]
144
+ end
145
+
146
+ class InFlightCall < Revox::Internal::Type::BaseModel
147
+ # @!attribute id
148
+ # The ID of the call.
149
+ #
150
+ # @return [String]
151
+ required :id, String
152
+
153
+ # @!attribute assignee
154
+ # The team member responsible for following up on this call.
155
+ #
156
+ # @return [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assignee, nil]
157
+ required :assignee,
158
+ -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assignee },
159
+ nil?: true
160
+
161
+ # @!attribute assistant
162
+ #
163
+ # @return [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant, nil]
164
+ required :assistant,
165
+ -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant },
166
+ nil?: true
167
+
168
+ # @!attribute call_attempts
169
+ # All call attempts for this call order, ordered by most recent first.
170
+ #
171
+ # @return [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt>]
172
+ required :call_attempts,
173
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt] }
174
+
175
+ # @!attribute call_retry_config
176
+ # Configuration for call retry behavior including time windows, delays, and max
177
+ # iterations. If not provided, defaults will be used.
178
+ #
179
+ # @return [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallRetryConfig, nil]
180
+ required :call_retry_config,
181
+ -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallRetryConfig },
182
+ nil?: true
183
+
184
+ # @!attribute calls_count
185
+ # The number of call attempts made.
186
+ #
187
+ # @return [Float]
188
+ required :calls_count, Float
189
+
190
+ # @!attribute campaign
191
+ #
192
+ # @return [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Campaign, nil]
193
+ required :campaign,
194
+ -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Campaign },
195
+ nil?: true
196
+
197
+ # @!attribute contact
198
+ # Magic contact variables (prospect identity) extracted from the call's input data
199
+ # and transcript.
200
+ #
201
+ # @return [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Contact]
202
+ required :contact, -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Contact }
203
+
204
+ # @!attribute created_at
205
+ # The time the call order was created.
206
+ #
207
+ # @return [Object]
208
+ required :created_at, Revox::Internal::Type::Unknown
209
+
210
+ # @!attribute direction
211
+ # Whether the call is inbound or outbound.
212
+ #
213
+ # @return [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Direction]
214
+ required :direction, enum: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Direction }
215
+
216
+ # @!attribute first_sentence_delay_ms
217
+ # Delay in milliseconds before speaking the first sentence. Default: 400.
218
+ #
219
+ # @return [Integer]
220
+ required :first_sentence_delay_ms, Integer
221
+
222
+ # @!attribute from_phone_number
223
+ # The phone number that made the call. Formatted in E.164 format. Example:
224
+ # +1234567890
225
+ #
226
+ # @return [String]
227
+ required :from_phone_number, String
228
+
229
+ # @!attribute is_cancelled
230
+ # DEPRECATED: Whether the call has been cancelled. This is derived from `status`.
231
+ # Use `status` instead.
232
+ #
233
+ # @return [Boolean]
234
+ required :is_cancelled, Revox::Internal::Type::Boolean
235
+
236
+ # @!attribute is_completed
237
+ # DEPRECATED: Whether the call has completed. This is derived from `status`. Use
238
+ # `status` instead.
239
+ #
240
+ # @return [Boolean]
241
+ required :is_completed, Revox::Internal::Type::Boolean
242
+
243
+ # @!attribute last_call_attempt
244
+ # This represent a single call attempt. A call attempt is a single call made to
245
+ # the phone number.
246
+ #
247
+ # @return [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt, nil]
248
+ required :last_call_attempt,
249
+ -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt },
250
+ nil?: true
251
+
252
+ # @!attribute llm_model
253
+ #
254
+ # @return [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LlmModel::UnionMember0, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LlmModel::UnionMember1, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LlmModel::UnionMember2, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LlmModel::UnionMember3]
255
+ required :llm_model, union: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LlmModel }
256
+
257
+ # @!attribute metadata
258
+ # Metadata stored with the call.
259
+ #
260
+ # @return [Hash{Symbol=>String}, nil]
261
+ required :metadata, Revox::Internal::Type::HashOf[String], nil?: true
262
+
263
+ # @!attribute organization_id
264
+ # The ID of the organization that owns the call.
265
+ #
266
+ # @return [String]
267
+ required :organization_id, String
268
+
269
+ # @!attribute prompt_variables
270
+ # Variables used to interpolate the prompt.
271
+ #
272
+ # @return [Hash{Symbol=>String}, nil]
273
+ required :prompt_variables, Revox::Internal::Type::HashOf[String], nil?: true
274
+
275
+ # @!attribute scheduled_at
276
+ # The time the call order is scheduled to start.
277
+ #
278
+ # @return [Object]
279
+ required :scheduled_at, Revox::Internal::Type::Unknown
280
+
281
+ # @!attribute status
282
+ # The status of the call.
283
+ #
284
+ # @return [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Status]
285
+ required :status, enum: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Status }
286
+
287
+ # @!attribute to_phone_number
288
+ # The phone number that received the call. Formatted in E.164 format. Example:
289
+ # +1234567890
290
+ #
291
+ # @return [String]
292
+ required :to_phone_number, String
293
+
294
+ # @!attribute updated_at
295
+ # The time the call order was last updated (any state change, retry, or analysis
296
+ # result).
297
+ #
298
+ # @return [Object]
299
+ required :updated_at, Revox::Internal::Type::Unknown
300
+
301
+ # @!attribute follow_up_emails
302
+ # Extra notification recipients resolved from the agent prompt's own routing
303
+ # rules, when it defines any. Added to the assistant's configured notification
304
+ # recipients; never replaces them. Null when the prompt defines no routing rules.
305
+ #
306
+ # @return [Array<String>, nil]
307
+ optional :follow_up_emails, Revox::Internal::Type::ArrayOf[String], nil?: true
308
+
309
+ # @!attribute outcome
310
+ # Business outcome of the call. Null if not computed or no transcript.
311
+ #
312
+ # @return [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Outcome, nil]
313
+ optional :outcome,
314
+ enum: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Outcome },
315
+ nil?: true
316
+
317
+ # @!attribute outcome_summary
318
+ # LLM explanation for the outcome, when outcome was computed from the transcript.
319
+ #
320
+ # @return [String, nil]
321
+ optional :outcome_summary, String, nil?: true
322
+
323
+ # @!attribute slack_channel_ids
324
+ # Slack channels resolved from the agent prompt's own routing rules, when it
325
+ # defines any. Always a subset of the channels configured on the assistant. Null
326
+ # when the prompt defines no routing rules, in which case every configured channel
327
+ # is notified.
328
+ #
329
+ # @return [Array<String>, nil]
330
+ optional :slack_channel_ids, Revox::Internal::Type::ArrayOf[String], nil?: true
331
+
332
+ # @!method initialize(id:, assignee:, assistant:, call_attempts:, call_retry_config:, calls_count:, campaign:, contact:, created_at:, direction:, first_sentence_delay_ms:, from_phone_number:, is_cancelled:, is_completed:, last_call_attempt:, llm_model:, metadata:, organization_id:, prompt_variables:, scheduled_at:, status:, to_phone_number:, updated_at:, follow_up_emails: nil, outcome: nil, outcome_summary: nil, slack_channel_ids: nil)
333
+ # Some parameter documentations has been truncated, see
334
+ # {Revox::Models::CampaignLaunchResponse::Session::InFlightCall} for more details.
335
+ #
336
+ # This represent a call "order" that was requested by the user. A call order can
337
+ # be resolved over multiple call attempts spanning up to a few days.
338
+ #
339
+ # @param id [String] The ID of the call.
340
+ #
341
+ # @param assignee [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assignee, nil] The team member responsible for following up on this call.
342
+ #
343
+ # @param assistant [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant, nil]
344
+ #
345
+ # @param call_attempts [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt>] All call attempts for this call order, ordered by most recent first.
346
+ #
347
+ # @param call_retry_config [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallRetryConfig, nil] Configuration for call retry behavior including time windows, delays, and max it
348
+ #
349
+ # @param calls_count [Float] The number of call attempts made.
350
+ #
351
+ # @param campaign [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Campaign, nil]
352
+ #
353
+ # @param contact [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Contact] Magic contact variables (prospect identity) extracted from the call's input data
354
+ #
355
+ # @param created_at [Object] The time the call order was created.
356
+ #
357
+ # @param direction [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Direction] Whether the call is inbound or outbound.
358
+ #
359
+ # @param first_sentence_delay_ms [Integer] Delay in milliseconds before speaking the first sentence. Default: 400.
360
+ #
361
+ # @param from_phone_number [String] The phone number that made the call. Formatted in E.164 format. Example: +123456
362
+ #
363
+ # @param is_cancelled [Boolean] DEPRECATED: Whether the call has been cancelled. This is derived from `status`.
364
+ #
365
+ # @param is_completed [Boolean] DEPRECATED: Whether the call has completed. This is derived from `status`. Use `
366
+ #
367
+ # @param last_call_attempt [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt, nil] This represent a single call attempt. A call attempt is a single call made to th
368
+ #
369
+ # @param llm_model [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LlmModel::UnionMember0, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LlmModel::UnionMember1, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LlmModel::UnionMember2, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LlmModel::UnionMember3]
370
+ #
371
+ # @param metadata [Hash{Symbol=>String}, nil] Metadata stored with the call.
372
+ #
373
+ # @param organization_id [String] The ID of the organization that owns the call.
374
+ #
375
+ # @param prompt_variables [Hash{Symbol=>String}, nil] Variables used to interpolate the prompt.
376
+ #
377
+ # @param scheduled_at [Object] The time the call order is scheduled to start.
378
+ #
379
+ # @param status [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Status] The status of the call.
380
+ #
381
+ # @param to_phone_number [String] The phone number that received the call. Formatted in E.164 format. Example: +12
382
+ #
383
+ # @param updated_at [Object] The time the call order was last updated (any state change, retry, or analysis r
384
+ #
385
+ # @param follow_up_emails [Array<String>, nil] Extra notification recipients resolved from the agent prompt's own routing rules
386
+ #
387
+ # @param outcome [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Outcome, nil] Business outcome of the call. Null if not computed or no transcript.
388
+ #
389
+ # @param outcome_summary [String, nil] LLM explanation for the outcome, when outcome was computed from the transcript.
390
+ #
391
+ # @param slack_channel_ids [Array<String>, nil] Slack channels resolved from the agent prompt's own routing rules, when it defin
392
+
393
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall#assignee
394
+ class Assignee < Revox::Internal::Type::BaseModel
395
+ # @!attribute id
396
+ # The database user id of the assignee.
397
+ #
398
+ # @return [String]
399
+ required :id, String
400
+
401
+ # @!attribute email
402
+ #
403
+ # @return [String]
404
+ required :email, String
405
+
406
+ # @!attribute first_name
407
+ #
408
+ # @return [String, nil]
409
+ required :first_name, String, nil?: true
410
+
411
+ # @!attribute last_name
412
+ #
413
+ # @return [String, nil]
414
+ required :last_name, String, nil?: true
415
+
416
+ # @!method initialize(id:, email:, first_name:, last_name:)
417
+ # The team member responsible for following up on this call.
418
+ #
419
+ # @param id [String] The database user id of the assignee.
420
+ #
421
+ # @param email [String]
422
+ #
423
+ # @param first_name [String, nil]
424
+ #
425
+ # @param last_name [String, nil]
426
+ end
427
+
428
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall#assistant
429
+ class Assistant < Revox::Internal::Type::BaseModel
430
+ # @!attribute id
431
+ #
432
+ # @return [String]
433
+ required :id, String
434
+
435
+ # @!attribute after_call_sms_outcomes
436
+ # Which call outcomes trigger the after-call SMS. When empty or null, no
437
+ # after-call SMS is sent. Use "none" when outcome is null.
438
+ #
439
+ # @return [Array<Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::AfterCallSMSOutcome>, nil]
440
+ required :after_call_sms_outcomes,
441
+ -> { Revox::Internal::Type::ArrayOf[enum: Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::AfterCallSMSOutcome] },
442
+ nil?: true
443
+
444
+ # @!attribute after_call_sms_prompt
445
+ # Prompt / instructions for the after-call SMS. Supports {{variable}}
446
+ # placeholders. When null, no after-call SMS is sent.
447
+ #
448
+ # @return [String, nil]
449
+ required :after_call_sms_prompt, String, nil?: true
450
+
451
+ # @!attribute background_sound
452
+ # Ambient background sound to play during the call. null disables it.
453
+ #
454
+ # @return [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::BackgroundSound, nil]
455
+ required :background_sound,
456
+ enum: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::BackgroundSound },
457
+ nil?: true
458
+
459
+ # @!attribute background_sound_volume
460
+ # Volume of the ambient background sound (0 = silent, 1 = max).
461
+ #
462
+ # @return [Float]
463
+ required :background_sound_volume, Float
464
+
465
+ # @!attribute calendly
466
+ #
467
+ # @return [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Calendly, nil]
468
+ required :calendly,
469
+ -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Calendly },
470
+ nil?: true
471
+
472
+ # @!attribute call_retry_config
473
+ # Configuration for call retry behavior including time windows, delays, and max
474
+ # iterations. If not provided, defaults will be used.
475
+ #
476
+ # @return [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::CallRetryConfig, nil]
477
+ required :call_retry_config,
478
+ -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::CallRetryConfig },
479
+ nil?: true
480
+
481
+ # @!attribute cartesia_dictionary_pronunciation_id
482
+ # Optional Cartesia pronunciation dictionary ID linked to this assistant.
483
+ #
484
+ # @return [String, nil]
485
+ required :cartesia_dictionary_pronunciation_id, String, nil?: true
486
+
487
+ # @!attribute created_at
488
+ #
489
+ # @return [Object]
490
+ required :created_at, Revox::Internal::Type::Unknown
491
+
492
+ # @!attribute custom_tools
493
+ #
494
+ # @return [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::CustomTool>, nil]
495
+ required :custom_tools,
496
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::CustomTool] },
497
+ nil?: true
498
+
499
+ # @!attribute email_notification_address
500
+ # Email address(es) to receive notifications when a call ends with a matching
501
+ # outcome. Accepts a single email or a comma-separated list (e.g. "alice@x.com,
502
+ # bob@y.com").
503
+ #
504
+ # @return [String, nil]
505
+ required :email_notification_address, String, nil?: true
506
+
507
+ # @!attribute email_notification_outcomes
508
+ # Which call outcomes trigger an email notification. E.g. ["interested",
509
+ # "completed", "none"]. Use "none" when outcome is null.
510
+ #
511
+ # @return [Array<Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::EmailNotificationOutcome>, nil]
512
+ required :email_notification_outcomes,
513
+ -> { Revox::Internal::Type::ArrayOf[enum: Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::EmailNotificationOutcome] },
514
+ nil?: true
515
+
516
+ # @!attribute end_of_call_sentence
517
+ #
518
+ # @return [String, nil]
519
+ required :end_of_call_sentence, String, nil?: true
520
+
521
+ # @!attribute first_sentence
522
+ #
523
+ # @return [String, nil]
524
+ required :first_sentence, String, nil?: true
525
+
526
+ # @!attribute first_sentence_delay_ms
527
+ # Delay in milliseconds before speaking the first sentence. Default: 400.
528
+ #
529
+ # @return [Integer]
530
+ required :first_sentence_delay_ms, Integer
531
+
532
+ # @!attribute first_sentence_mode
533
+ #
534
+ # @return [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::FirstSentenceMode]
535
+ required :first_sentence_mode,
536
+ enum: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::FirstSentenceMode }
537
+
538
+ # @!attribute from_phone_number
539
+ # Override the default outbound phone number for calls placed with this assistant.
540
+ # When null, the organization's default phone number is used.
541
+ #
542
+ # @return [String, nil]
543
+ required :from_phone_number, String, nil?: true
544
+
545
+ # @!attribute human_transfer_mode
546
+ # Warm or cold transfer when transfer_destinations is non-empty; null when
547
+ # transfer is not configured.
548
+ #
549
+ # @return [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::HumanTransferMode, nil]
550
+ required :human_transfer_mode,
551
+ enum: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::HumanTransferMode },
552
+ nil?: true
553
+
554
+ # @!attribute ivr_navigation_enabled
555
+ # Enable IVR navigation tools. When enabled, the assistant can send DTMF tones and
556
+ # skip turns to navigate phone menus.
557
+ #
558
+ # @return [Boolean]
559
+ required :ivr_navigation_enabled, Revox::Internal::Type::Boolean
560
+
561
+ # @!attribute llm_model
562
+ #
563
+ # @return [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::LlmModel::UnionMember0, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::LlmModel::UnionMember1, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::LlmModel::UnionMember2, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::LlmModel::UnionMember3]
564
+ required :llm_model,
565
+ union: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::LlmModel }
566
+
567
+ # @!attribute logo_url
568
+ # Public URL of the brand logo shown on the assistant's demo page. Null when
569
+ # unset.
570
+ #
571
+ # @return [String, nil]
572
+ required :logo_url, String, nil?: true
573
+
574
+ # @!attribute max_call_duration_secs
575
+ # The maximum duration of the call in seconds. This is the maximum time the call
576
+ # will be allowed to run.
577
+ #
578
+ # @return [Float]
579
+ required :max_call_duration_secs, Float
580
+
581
+ # @!attribute max_duration_end_message
582
+ # Optional message the agent will say, without being interruptible, when the call
583
+ # reaches its max duration. Kept short so it fits inside the farewell buffer. If
584
+ # null, the call ends silently.
585
+ #
586
+ # @return [String, nil]
587
+ required :max_duration_end_message, String, nil?: true
588
+
589
+ # @!attribute name
590
+ #
591
+ # @return [String]
592
+ required :name, String
593
+
594
+ # @!attribute organization_id
595
+ #
596
+ # @return [String]
597
+ required :organization_id, String
598
+
599
+ # @!attribute position
600
+ #
601
+ # @return [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Position, nil]
602
+ required :position,
603
+ -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Position },
604
+ nil?: true
605
+
606
+ # @!attribute precall_lookup_url
607
+ # URL fetched before an inbound call is answered to resolve the assistant's prompt
608
+ # variables. Null when no lookup is configured.
609
+ #
610
+ # @return [String, nil]
611
+ required :precall_lookup_url, String, nil?: true
612
+
613
+ # @!attribute prompt
614
+ #
615
+ # @return [String]
616
+ required :prompt, String
617
+
618
+ # @!attribute prompt_flow
619
+ #
620
+ # @return [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::PromptFlow, nil]
621
+ required :prompt_flow,
622
+ -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::PromptFlow },
623
+ nil?: true
624
+
625
+ # @!attribute slack
626
+ #
627
+ # @return [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Slack, nil]
628
+ required :slack,
629
+ -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Slack },
630
+ nil?: true
631
+
632
+ # @!attribute sms_enabled
633
+ # Enable SMS tool during calls. When enabled, the agent can send SMS messages to
634
+ # the user on the call.
635
+ #
636
+ # @return [Boolean]
637
+ required :sms_enabled, Revox::Internal::Type::Boolean
638
+
639
+ # @!attribute sms_template
640
+ # Hardcoded SMS template to send during calls. When set, this exact text is sent
641
+ # instead of letting the agent generate the message. Supports {{variable}}
642
+ # placeholders.
643
+ #
644
+ # @return [String, nil]
645
+ required :sms_template, String, nil?: true
646
+
647
+ # @!attribute structured_output_config
648
+ # The structured output config to use for the call. This is used to extract the
649
+ # data from the call (like email, name, company name, etc.).
650
+ #
651
+ # @return [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::StructuredOutputConfig>, nil]
652
+ required :structured_output_config,
653
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::StructuredOutputConfig] },
654
+ nil?: true
655
+
656
+ # @!attribute structured_output_prompt
657
+ # Custom prompt for structured data extraction. If not provided, a default prompt
658
+ # is used. Available variables: {{transcript}}, {{call_direction}},
659
+ # {{user_phone_number}}, {{agent_phone_number}}.
660
+ #
661
+ # @return [String, nil]
662
+ required :structured_output_prompt, String, nil?: true
663
+
664
+ # @!attribute stt_context
665
+ # Assistant-level speech-to-text context: structured `general` key/value pairs
666
+ # plus a list of domain `terms`. Prompt-derived context is merged in without
667
+ # replacing existing entries.
668
+ #
669
+ # @return [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::SttContext, nil]
670
+ required :stt_context,
671
+ -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::SttContext },
672
+ nil?: true
673
+
674
+ # @!attribute stt_model
675
+ # Transcriber (speech-to-text) model used for the assistant.
676
+ #
677
+ # @return [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::SttModel]
678
+ required :stt_model,
679
+ enum: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::SttModel }
680
+
681
+ # @!attribute thinking_sound
682
+ # Audio clip to play while the agent is processing a response. One of the built-in
683
+ # LiveKit audio clips; null disables it.
684
+ #
685
+ # @return [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::ThinkingSound, nil]
686
+ required :thinking_sound,
687
+ enum: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::ThinkingSound },
688
+ nil?: true
689
+
690
+ # @!attribute thinking_sound_probability
691
+ # Probability [0..1] that the thinking sound plays on any given turn; otherwise
692
+ # the agent is silent while thinking.
693
+ #
694
+ # @return [Float]
695
+ required :thinking_sound_probability, Float
696
+
697
+ # @!attribute thinking_sound_volume
698
+ # Volume of the thinking sound (0 = silent, 1 = max).
699
+ #
700
+ # @return [Float]
701
+ required :thinking_sound_volume, Float
702
+
703
+ # @!attribute transfer_destinations
704
+ # Where calls can be transferred to when users ask to speak to a human. Null or
705
+ # empty when transfer is not configured.
706
+ #
707
+ # @return [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::TransferDestination>, nil]
708
+ required :transfer_destinations,
709
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::TransferDestination] },
710
+ nil?: true
711
+
712
+ # @!attribute type
713
+ #
714
+ # @return [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Type]
715
+ required :type, enum: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Type }
716
+
717
+ # @!attribute updated_at
718
+ #
719
+ # @return [Object]
720
+ required :updated_at, Revox::Internal::Type::Unknown
721
+
722
+ # @!attribute voice
723
+ #
724
+ # @return [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Voice, nil]
725
+ required :voice,
726
+ -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Voice },
727
+ nil?: true
728
+
729
+ # @!attribute voicemail_message
730
+ # If set, when voicemail is detected the agent will speak this message then hang
731
+ # up; if null, hang up immediately.
732
+ #
733
+ # @return [String, nil]
734
+ required :voicemail_message, String, nil?: true
735
+
736
+ # @!attribute voicemail_sms_prompt
737
+ # Prompt / instructions for the voicemail SMS. Supports {{variable}} placeholders.
738
+ # When null, no SMS is sent on voicemail.
739
+ #
740
+ # @return [String, nil]
741
+ required :voicemail_sms_prompt, String, nil?: true
742
+
743
+ # @!attribute warm_transfer_summary_instructions
744
+ # Warm transfer only: instructions for the supervisor handoff summary; null when
745
+ # not configured or cold transfer.
746
+ #
747
+ # @return [String, nil]
748
+ required :warm_transfer_summary_instructions, String, nil?: true
749
+
750
+ # @!attribute webhook_url
751
+ # The webhook URL to call when the call is completed.
752
+ #
753
+ # @return [String, nil]
754
+ required :webhook_url, String, nil?: true
755
+
756
+ # @!attribute zoho
757
+ #
758
+ # @return [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Zoho, nil]
759
+ required :zoho,
760
+ -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Zoho },
761
+ nil?: true
762
+
763
+ # @!attribute created_by
764
+ # The user who created the assistant.
765
+ #
766
+ # @return [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::CreatedBy, nil]
767
+ optional :created_by,
768
+ -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::CreatedBy },
769
+ nil?: true
770
+
771
+ # @!attribute faq_items
772
+ #
773
+ # @return [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::FaqItem>, nil]
774
+ optional :faq_items,
775
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::FaqItem] }
776
+
777
+ # @!attribute is_inbound_receptionist
778
+ #
779
+ # @return [Boolean, nil]
780
+ optional :is_inbound_receptionist, Revox::Internal::Type::Boolean
781
+
782
+ # @!attribute is_realestate_assistant
783
+ #
784
+ # @return [Boolean, nil]
785
+ optional :is_realestate_assistant, Revox::Internal::Type::Boolean
786
+
787
+ # @!attribute pending_faq_count
788
+ #
789
+ # @return [Float, nil]
790
+ optional :pending_faq_count, Float
791
+
792
+ # @!method initialize(id:, after_call_sms_outcomes:, after_call_sms_prompt:, background_sound:, background_sound_volume:, calendly:, call_retry_config:, cartesia_dictionary_pronunciation_id:, created_at:, custom_tools:, email_notification_address:, email_notification_outcomes:, end_of_call_sentence:, first_sentence:, first_sentence_delay_ms:, first_sentence_mode:, from_phone_number:, human_transfer_mode:, ivr_navigation_enabled:, llm_model:, logo_url:, max_call_duration_secs:, max_duration_end_message:, name:, organization_id:, position:, precall_lookup_url:, prompt:, prompt_flow:, slack:, sms_enabled:, sms_template:, structured_output_config:, structured_output_prompt:, stt_context:, stt_model:, thinking_sound:, thinking_sound_probability:, thinking_sound_volume:, transfer_destinations:, type:, updated_at:, voice:, voicemail_message:, voicemail_sms_prompt:, warm_transfer_summary_instructions:, webhook_url:, zoho:, created_by: nil, faq_items: nil, is_inbound_receptionist: nil, is_realestate_assistant: nil, pending_faq_count: nil)
793
+ # Some parameter documentations has been truncated, see
794
+ # {Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant} for
795
+ # more details.
796
+ #
797
+ # @param id [String]
798
+ #
799
+ # @param after_call_sms_outcomes [Array<Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::AfterCallSMSOutcome>, nil] Which call outcomes trigger the after-call SMS. When empty or null, no after-cal
800
+ #
801
+ # @param after_call_sms_prompt [String, nil] Prompt / instructions for the after-call SMS. Supports {{variable}} placeholders
802
+ #
803
+ # @param background_sound [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::BackgroundSound, nil] Ambient background sound to play during the call. null disables it.
804
+ #
805
+ # @param background_sound_volume [Float] Volume of the ambient background sound (0 = silent, 1 = max).
806
+ #
807
+ # @param calendly [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Calendly, nil]
808
+ #
809
+ # @param call_retry_config [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::CallRetryConfig, nil] Configuration for call retry behavior including time windows, delays, and max it
810
+ #
811
+ # @param cartesia_dictionary_pronunciation_id [String, nil] Optional Cartesia pronunciation dictionary ID linked to this assistant.
812
+ #
813
+ # @param created_at [Object]
814
+ #
815
+ # @param custom_tools [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::CustomTool>, nil]
816
+ #
817
+ # @param email_notification_address [String, nil] Email address(es) to receive notifications when a call ends with a matching outc
818
+ #
819
+ # @param email_notification_outcomes [Array<Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::EmailNotificationOutcome>, nil] Which call outcomes trigger an email notification. E.g. ["interested", "complete
820
+ #
821
+ # @param end_of_call_sentence [String, nil]
822
+ #
823
+ # @param first_sentence [String, nil]
824
+ #
825
+ # @param first_sentence_delay_ms [Integer] Delay in milliseconds before speaking the first sentence. Default: 400.
826
+ #
827
+ # @param first_sentence_mode [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::FirstSentenceMode]
828
+ #
829
+ # @param from_phone_number [String, nil] Override the default outbound phone number for calls placed with this assistant.
830
+ #
831
+ # @param human_transfer_mode [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::HumanTransferMode, nil] Warm or cold transfer when transfer_destinations is non-empty; null when transfe
832
+ #
833
+ # @param ivr_navigation_enabled [Boolean] Enable IVR navigation tools. When enabled, the assistant can send DTMF tones and
834
+ #
835
+ # @param llm_model [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::LlmModel::UnionMember0, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::LlmModel::UnionMember1, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::LlmModel::UnionMember2, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::LlmModel::UnionMember3]
836
+ #
837
+ # @param logo_url [String, nil] Public URL of the brand logo shown on the assistant's demo page. Null when unset
838
+ #
839
+ # @param max_call_duration_secs [Float] The maximum duration of the call in seconds. This is the maximum time the call w
840
+ #
841
+ # @param max_duration_end_message [String, nil] Optional message the agent will say, without being interruptible, when the call
842
+ #
843
+ # @param name [String]
844
+ #
845
+ # @param organization_id [String]
846
+ #
847
+ # @param position [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Position, nil]
848
+ #
849
+ # @param precall_lookup_url [String, nil] URL fetched before an inbound call is answered to resolve the assistant's prompt
850
+ #
851
+ # @param prompt [String]
852
+ #
853
+ # @param prompt_flow [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::PromptFlow, nil]
854
+ #
855
+ # @param slack [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Slack, nil]
856
+ #
857
+ # @param sms_enabled [Boolean] Enable SMS tool during calls. When enabled, the agent can send SMS messages to t
858
+ #
859
+ # @param sms_template [String, nil] Hardcoded SMS template to send during calls. When set, this exact text is sent i
860
+ #
861
+ # @param structured_output_config [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::StructuredOutputConfig>, nil] The structured output config to use for the call. This is used to extract the da
862
+ #
863
+ # @param structured_output_prompt [String, nil] Custom prompt for structured data extraction. If not provided, a default prompt
864
+ #
865
+ # @param stt_context [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::SttContext, nil] Assistant-level speech-to-text context: structured `general` key/value pairs plu
866
+ #
867
+ # @param stt_model [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::SttModel] Transcriber (speech-to-text) model used for the assistant.
868
+ #
869
+ # @param thinking_sound [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::ThinkingSound, nil] Audio clip to play while the agent is processing a response. One of the built-in
870
+ #
871
+ # @param thinking_sound_probability [Float] Probability [0..1] that the thinking sound plays on any given turn; otherwise th
872
+ #
873
+ # @param thinking_sound_volume [Float] Volume of the thinking sound (0 = silent, 1 = max).
874
+ #
875
+ # @param transfer_destinations [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::TransferDestination>, nil] Where calls can be transferred to when users ask to speak to a human. Null or em
876
+ #
877
+ # @param type [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Type]
878
+ #
879
+ # @param updated_at [Object]
880
+ #
881
+ # @param voice [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Voice, nil]
882
+ #
883
+ # @param voicemail_message [String, nil] If set, when voicemail is detected the agent will speak this message then hang u
884
+ #
885
+ # @param voicemail_sms_prompt [String, nil] Prompt / instructions for the voicemail SMS. Supports {{variable}} placeholders.
886
+ #
887
+ # @param warm_transfer_summary_instructions [String, nil] Warm transfer only: instructions for the supervisor handoff summary; null when n
888
+ #
889
+ # @param webhook_url [String, nil] The webhook URL to call when the call is completed.
890
+ #
891
+ # @param zoho [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Zoho, nil]
892
+ #
893
+ # @param created_by [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::CreatedBy, nil] The user who created the assistant.
894
+ #
895
+ # @param faq_items [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::FaqItem>]
896
+ #
897
+ # @param is_inbound_receptionist [Boolean]
898
+ #
899
+ # @param is_realestate_assistant [Boolean]
900
+ #
901
+ # @param pending_faq_count [Float]
902
+
903
+ module AfterCallSMSOutcome
904
+ extend Revox::Internal::Type::Enum
905
+
906
+ NOT_INTERESTED = :not_interested
907
+ INTERESTED = :interested
908
+ COMPLETED = :completed
909
+ REQUESTED_CALLBACK_LATER = :requested_callback_later
910
+ NONE = :none
911
+
912
+ # @!method self.values
913
+ # @return [Array<Symbol>]
914
+ end
915
+
916
+ # Ambient background sound to play during the call. null disables it.
917
+ #
918
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant#background_sound
919
+ module BackgroundSound
920
+ extend Revox::Internal::Type::Enum
921
+
922
+ AUDIO_OFFICE_OGG = :"audio/office.ogg"
923
+
924
+ # @!method self.values
925
+ # @return [Array<Symbol>]
926
+ end
927
+
928
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant#calendly
929
+ class Calendly < Revox::Internal::Type::BaseModel
930
+ # @!attribute connection_id
931
+ # The connection ID representing the link between your Calendly account and Revox.
932
+ #
933
+ # @return [String]
934
+ required :connection_id, String
935
+
936
+ # @!attribute event_type_id
937
+ # The event type ID representing the event type to schedule. (eg:
938
+ # https://api.calendly.com/event_types/b2330295-2a91-4a1d-bb73-99e7707663d5)
939
+ #
940
+ # @return [String]
941
+ required :event_type_id, String
942
+
943
+ # @!method initialize(connection_id:, event_type_id:)
944
+ # Some parameter documentations has been truncated, see
945
+ # {Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Calendly}
946
+ # for more details.
947
+ #
948
+ # @param connection_id [String] The connection ID representing the link between your Calendly account and Revox.
949
+ #
950
+ # @param event_type_id [String] The event type ID representing the event type to schedule. (eg: https://api.cale
951
+ end
952
+
953
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant#call_retry_config
954
+ class CallRetryConfig < Revox::Internal::Type::BaseModel
955
+ # @!attribute allowed_days
956
+ # Days of the week when calls are allowed, in the recipient's timezone. Default:
957
+ # Monday through Friday.
958
+ #
959
+ # @return [Array<Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::CallRetryConfig::AllowedDay>]
960
+ required :allowed_days,
961
+ -> { Revox::Internal::Type::ArrayOf[enum: Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::CallRetryConfig::AllowedDay] }
962
+
963
+ # @!attribute call_twice_in_a_row
964
+ # If true and max_retry_attempts >= 2, attempt #2 fires immediately (skipping
965
+ # retry_delay_seconds) when attempt #1 didn't reach a human.
966
+ # Calling-window/allowed-days checks still apply. Only affects the 1→2 transition.
967
+ # Default: false.
968
+ #
969
+ # @return [Boolean]
970
+ required :call_twice_in_a_row, Revox::Internal::Type::Boolean
971
+
972
+ # @!attribute calling_windows
973
+ #
974
+ # @return [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::CallRetryConfig::CallingWindow>]
975
+ required :calling_windows,
976
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::CallRetryConfig::CallingWindow] }
977
+
978
+ # @!attribute max_retry_attempts
979
+ # Maximum number of call retry attempts. Default: 3.
980
+ #
981
+ # @return [Integer]
982
+ required :max_retry_attempts, Integer
983
+
984
+ # @!attribute timezone
985
+ # Optional IANA timezone identifier to override the automatic timezone detection
986
+ # from phone number. If not provided, timezone is determined from the recipient's
987
+ # phone number country code. Examples: 'America/New_York', 'Europe/Paris'.
988
+ #
989
+ # @return [String, nil]
990
+ optional :timezone, String, nil?: true
991
+
992
+ # @!method initialize(allowed_days:, call_twice_in_a_row:, calling_windows:, max_retry_attempts:, timezone: nil)
993
+ # Some parameter documentations has been truncated, see
994
+ # {Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::CallRetryConfig}
995
+ # for more details.
996
+ #
997
+ # Configuration for call retry behavior including time windows, delays, and max
998
+ # iterations. If not provided, defaults will be used.
999
+ #
1000
+ # @param allowed_days [Array<Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::CallRetryConfig::AllowedDay>] Days of the week when calls are allowed, in the recipient's timezone. Default: M
1001
+ #
1002
+ # @param call_twice_in_a_row [Boolean] If true and max_retry_attempts >= 2, attempt #2 fires immediately (skipping retr
1003
+ #
1004
+ # @param calling_windows [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::CallRetryConfig::CallingWindow>]
1005
+ #
1006
+ # @param max_retry_attempts [Integer] Maximum number of call retry attempts. Default: 3.
1007
+ #
1008
+ # @param timezone [String, nil] Optional IANA timezone identifier to override the automatic timezone detection f
1009
+
1010
+ module AllowedDay
1011
+ extend Revox::Internal::Type::Enum
1012
+
1013
+ MONDAY = :monday
1014
+ TUESDAY = :tuesday
1015
+ WEDNESDAY = :wednesday
1016
+ THURSDAY = :thursday
1017
+ FRIDAY = :friday
1018
+ SATURDAY = :saturday
1019
+ SUNDAY = :sunday
1020
+
1021
+ # @!method self.values
1022
+ # @return [Array<Symbol>]
1023
+ end
1024
+
1025
+ class CallingWindow < Revox::Internal::Type::BaseModel
1026
+ # @!attribute calling_window_end_time
1027
+ # End time for the calling window in the recipient's timezone (or
1028
+ # timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
1029
+ # Examples: '17:00', '6pm'. Default: '18:00'.
1030
+ #
1031
+ # @return [String]
1032
+ required :calling_window_end_time, String
1033
+
1034
+ # @!attribute calling_window_start_time
1035
+ # Start time for the calling window in the recipient's timezone (or
1036
+ # timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
1037
+ # Examples: '09:00', '10am'. Default: '10:00'.
1038
+ #
1039
+ # @return [String]
1040
+ required :calling_window_start_time, String
1041
+
1042
+ # @!attribute retry_delay_seconds
1043
+ # Delay between retry attempts in seconds. 0 retries as soon as the calling window
1044
+ # allows. Default: 7200 (2 hours).
1045
+ #
1046
+ # @return [Integer]
1047
+ required :retry_delay_seconds, Integer
1048
+
1049
+ # @!method initialize(calling_window_end_time:, calling_window_start_time:, retry_delay_seconds:)
1050
+ # Some parameter documentations has been truncated, see
1051
+ # {Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::CallRetryConfig::CallingWindow}
1052
+ # for more details.
1053
+ #
1054
+ # @param calling_window_end_time [String] End time for the calling window in the recipient's timezone (or timezone_overrid
1055
+ #
1056
+ # @param calling_window_start_time [String] Start time for the calling window in the recipient's timezone (or timezone_overr
1057
+ #
1058
+ # @param retry_delay_seconds [Integer] Delay between retry attempts in seconds. 0 retries as soon as the calling window
1059
+ end
1060
+ end
1061
+
1062
+ class CustomTool < Revox::Internal::Type::BaseModel
1063
+ # @!attribute body_template
1064
+ # JSON body template for the request. Use quoted {{variable}} placeholders (e.g.
1065
+ # "{{name}}") for dynamic values
1066
+ #
1067
+ # @return [String, nil]
1068
+ required :body_template, String, nil?: true
1069
+
1070
+ # @!attribute description
1071
+ # Human-readable description of what the tool does, used by the LLM to decide when
1072
+ # to call it
1073
+ #
1074
+ # @return [String]
1075
+ required :description, String
1076
+
1077
+ # @!attribute headers
1078
+ # HTTP headers to include in the request. Values support {{variable}} placeholders
1079
+ #
1080
+ # @return [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::CustomTool::Header>]
1081
+ required :headers,
1082
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::CustomTool::Header] }
1083
+
1084
+ # @!attribute input_schema
1085
+ # Schema defining the parameters the LLM should extract from the conversation to
1086
+ # pass to this tool
1087
+ #
1088
+ # @return [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::CustomTool::InputSchema>]
1089
+ required :input_schema,
1090
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::CustomTool::InputSchema] }
1091
+
1092
+ # @!attribute method_
1093
+ # HTTP method to use when calling the API endpoint
1094
+ #
1095
+ # @return [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::CustomTool::Method]
1096
+ required :method_,
1097
+ enum: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::CustomTool::Method },
1098
+ api_name: :method
1099
+
1100
+ # @!attribute name
1101
+ # Unique tool name in lowercase_snake_case (e.g. check_inventory)
1102
+ #
1103
+ # @return [String]
1104
+ required :name, String
1105
+
1106
+ # @!attribute query_params
1107
+ # Query string parameters appended to the URL. Values support {{variable}}
1108
+ # placeholders
1109
+ #
1110
+ # @return [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::CustomTool::QueryParam>]
1111
+ required :query_params,
1112
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::CustomTool::QueryParam] }
1113
+
1114
+ # @!attribute url
1115
+ # Full URL of the API endpoint. Supports {{variable}} placeholders for dynamic
1116
+ # values
1117
+ #
1118
+ # @return [String]
1119
+ required :url, String
1120
+
1121
+ # @!method initialize(body_template:, description:, headers:, input_schema:, method_:, name:, query_params:, url:)
1122
+ # Some parameter documentations has been truncated, see
1123
+ # {Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::CustomTool}
1124
+ # for more details.
1125
+ #
1126
+ # @param body_template [String, nil] JSON body template for the request. Use quoted {{variable}} placeholders (e.g. "
1127
+ #
1128
+ # @param description [String] Human-readable description of what the tool does, used by the LLM to decide when
1129
+ #
1130
+ # @param headers [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::CustomTool::Header>] HTTP headers to include in the request. Values support {{variable}} placeholders
1131
+ #
1132
+ # @param input_schema [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::CustomTool::InputSchema>] Schema defining the parameters the LLM should extract from the conversation to p
1133
+ #
1134
+ # @param method_ [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::CustomTool::Method] HTTP method to use when calling the API endpoint
1135
+ #
1136
+ # @param name [String] Unique tool name in lowercase_snake_case (e.g. check_inventory)
1137
+ #
1138
+ # @param query_params [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::CustomTool::QueryParam>] Query string parameters appended to the URL. Values support {{variable}} placeho
1139
+ #
1140
+ # @param url [String] Full URL of the API endpoint. Supports {{variable}} placeholders for dynamic val
1141
+
1142
+ class Header < Revox::Internal::Type::BaseModel
1143
+ # @!attribute key
1144
+ #
1145
+ # @return [String]
1146
+ required :key, String
1147
+
1148
+ # @!attribute value
1149
+ #
1150
+ # @return [String]
1151
+ required :value, String
1152
+
1153
+ # @!method initialize(key:, value:)
1154
+ # @param key [String]
1155
+ # @param value [String]
1156
+ end
1157
+
1158
+ class InputSchema < Revox::Internal::Type::BaseModel
1159
+ # @!attribute name
1160
+ #
1161
+ # @return [String]
1162
+ required :name, String
1163
+
1164
+ # @!attribute required
1165
+ #
1166
+ # @return [Boolean]
1167
+ required :required, Revox::Internal::Type::Boolean
1168
+
1169
+ # @!attribute type
1170
+ #
1171
+ # @return [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::CustomTool::InputSchema::Type]
1172
+ required :type,
1173
+ enum: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::CustomTool::InputSchema::Type }
1174
+
1175
+ # @!attribute description
1176
+ #
1177
+ # @return [String, nil]
1178
+ optional :description, String
1179
+
1180
+ # @!attribute enum_options
1181
+ #
1182
+ # @return [Array<String>, nil]
1183
+ optional :enum_options, Revox::Internal::Type::ArrayOf[String]
1184
+
1185
+ # @!method initialize(name:, required:, type:, description: nil, enum_options: nil)
1186
+ # @param name [String]
1187
+ # @param required [Boolean]
1188
+ # @param type [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::CustomTool::InputSchema::Type]
1189
+ # @param description [String]
1190
+ # @param enum_options [Array<String>]
1191
+
1192
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::CustomTool::InputSchema#type
1193
+ module Type
1194
+ extend Revox::Internal::Type::Enum
1195
+
1196
+ STRING = :string
1197
+ NUMBER = :number
1198
+ BOOLEAN = :boolean
1199
+ ENUM = :enum
1200
+ DATE = :date
1201
+ DATETIME = :datetime
1202
+
1203
+ # @!method self.values
1204
+ # @return [Array<Symbol>]
1205
+ end
1206
+ end
1207
+
1208
+ # HTTP method to use when calling the API endpoint
1209
+ #
1210
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::CustomTool#method_
1211
+ module Method
1212
+ extend Revox::Internal::Type::Enum
1213
+
1214
+ GET = :GET
1215
+ POST = :POST
1216
+ PUT = :PUT
1217
+ PATCH = :PATCH
1218
+ DELETE = :DELETE
1219
+
1220
+ # @!method self.values
1221
+ # @return [Array<Symbol>]
1222
+ end
1223
+
1224
+ class QueryParam < Revox::Internal::Type::BaseModel
1225
+ # @!attribute key
1226
+ #
1227
+ # @return [String]
1228
+ required :key, String
1229
+
1230
+ # @!attribute value
1231
+ #
1232
+ # @return [String]
1233
+ required :value, String
1234
+
1235
+ # @!method initialize(key:, value:)
1236
+ # @param key [String]
1237
+ # @param value [String]
1238
+ end
1239
+ end
1240
+
1241
+ module EmailNotificationOutcome
1242
+ extend Revox::Internal::Type::Enum
1243
+
1244
+ NOT_INTERESTED = :not_interested
1245
+ INTERESTED = :interested
1246
+ COMPLETED = :completed
1247
+ REQUESTED_CALLBACK_LATER = :requested_callback_later
1248
+ NONE = :none
1249
+
1250
+ # @!method self.values
1251
+ # @return [Array<Symbol>]
1252
+ end
1253
+
1254
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant#first_sentence_mode
1255
+ module FirstSentenceMode
1256
+ extend Revox::Internal::Type::Enum
1257
+
1258
+ GENERATED = :generated
1259
+ STATIC = :static
1260
+ NONE = :none
1261
+
1262
+ # @!method self.values
1263
+ # @return [Array<Symbol>]
1264
+ end
1265
+
1266
+ # Warm or cold transfer when transfer_destinations is non-empty; null when
1267
+ # transfer is not configured.
1268
+ #
1269
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant#human_transfer_mode
1270
+ module HumanTransferMode
1271
+ extend Revox::Internal::Type::Enum
1272
+
1273
+ WARM = :warm
1274
+ COLD = :cold
1275
+
1276
+ # @!method self.values
1277
+ # @return [Array<Symbol>]
1278
+ end
1279
+
1280
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant#llm_model
1281
+ module LlmModel
1282
+ extend Revox::Internal::Type::Union
1283
+
1284
+ variant -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::LlmModel::UnionMember0 }
1285
+
1286
+ variant -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::LlmModel::UnionMember1 }
1287
+
1288
+ variant -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::LlmModel::UnionMember2 }
1289
+
1290
+ variant -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::LlmModel::UnionMember3 }
1291
+
1292
+ class UnionMember0 < Revox::Internal::Type::BaseModel
1293
+ # @!attribute name
1294
+ #
1295
+ # @return [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::LlmModel::UnionMember0::Name]
1296
+ required :name,
1297
+ enum: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::LlmModel::UnionMember0::Name }
1298
+
1299
+ # @!attribute type
1300
+ #
1301
+ # @return [Symbol, :"dedicated-instance"]
1302
+ required :type, const: :"dedicated-instance"
1303
+
1304
+ # @!method initialize(name:, type: :"dedicated-instance")
1305
+ # @param name [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::LlmModel::UnionMember0::Name]
1306
+ # @param type [Symbol, :"dedicated-instance"]
1307
+
1308
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::LlmModel::UnionMember0#name
1309
+ module Name
1310
+ extend Revox::Internal::Type::Enum
1311
+
1312
+ GPT_4_1 = :"gpt-4.1"
1313
+ MINISTRAL_3_8B_INSTRUCT = :"ministral-3-8b-instruct"
1314
+
1315
+ # @!method self.values
1316
+ # @return [Array<Symbol>]
1317
+ end
1318
+ end
1319
+
1320
+ class UnionMember1 < Revox::Internal::Type::BaseModel
1321
+ # @!attribute openrouter_model_id
1322
+ # The model ID to use from OpenRouter. eg: openai/gpt-4.1
1323
+ #
1324
+ # @return [String]
1325
+ required :openrouter_model_id, String
1326
+
1327
+ # @!attribute openrouter_provider
1328
+ # The provider to use from OpenRouter. eg: nebius, openai, azure, etc.
1329
+ #
1330
+ # @return [String]
1331
+ required :openrouter_provider, String
1332
+
1333
+ # @!attribute type
1334
+ # Use a model from OpenRouter.
1335
+ #
1336
+ # @return [Symbol, :openrouter]
1337
+ required :type, const: :openrouter
1338
+
1339
+ # @!method initialize(openrouter_model_id:, openrouter_provider:, type: :openrouter)
1340
+ # @param openrouter_model_id [String] The model ID to use from OpenRouter. eg: openai/gpt-4.1
1341
+ #
1342
+ # @param openrouter_provider [String] The provider to use from OpenRouter. eg: nebius, openai, azure, etc.
1343
+ #
1344
+ # @param type [Symbol, :openrouter] Use a model from OpenRouter.
1345
+ end
1346
+
1347
+ class UnionMember2 < Revox::Internal::Type::BaseModel
1348
+ # @!attribute api_key
1349
+ # API key sent as Bearer token to the custom endpoint.
1350
+ #
1351
+ # @return [String]
1352
+ required :api_key, String
1353
+
1354
+ # @!attribute api_url
1355
+ # Base URL for the OpenAI-compatible API, e.g. https://api.together.xyz/v1
1356
+ #
1357
+ # @return [String]
1358
+ required :api_url, String
1359
+
1360
+ # @!attribute model_name
1361
+ # Model name as expected by the provider, e.g. meta-llama/llama-3-70b
1362
+ #
1363
+ # @return [String]
1364
+ required :model_name, String
1365
+
1366
+ # @!attribute type
1367
+ # OpenAI-compatible chat completions API (bring your own endpoint and key).
1368
+ #
1369
+ # @return [Symbol, :custom]
1370
+ required :type, const: :custom
1371
+
1372
+ # @!method initialize(api_key:, api_url:, model_name:, type: :custom)
1373
+ # @param api_key [String] API key sent as Bearer token to the custom endpoint.
1374
+ #
1375
+ # @param api_url [String] Base URL for the OpenAI-compatible API, e.g. https://api.together.xyz/v1
1376
+ #
1377
+ # @param model_name [String] Model name as expected by the provider, e.g. meta-llama/llama-3-70b
1378
+ #
1379
+ # @param type [Symbol, :custom] OpenAI-compatible chat completions API (bring your own endpoint and key).
1380
+ end
1381
+
1382
+ class UnionMember3 < Revox::Internal::Type::BaseModel
1383
+ # @!attribute provider
1384
+ # The provider to use from Realtime. eg: openai, google.
1385
+ #
1386
+ # @return [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::LlmModel::UnionMember3::Provider]
1387
+ required :provider,
1388
+ enum: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::LlmModel::UnionMember3::Provider }
1389
+
1390
+ # @!attribute realtime_model_id
1391
+ # The model ID to use from Realtime. eg: gpt-4.1
1392
+ #
1393
+ # @return [String]
1394
+ required :realtime_model_id, String
1395
+
1396
+ # @!attribute type
1397
+ # Use a model from Realtime.
1398
+ #
1399
+ # @return [Symbol, :realtime]
1400
+ required :type, const: :realtime
1401
+
1402
+ # @!attribute realtime_voice_id
1403
+ # Output voice for the realtime provider (e.g. OpenAI: marin; Gemini: Puck).
1404
+ #
1405
+ # @return [String, nil]
1406
+ optional :realtime_voice_id, String
1407
+
1408
+ # @!method initialize(provider:, realtime_model_id:, realtime_voice_id: nil, type: :realtime)
1409
+ # @param provider [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::LlmModel::UnionMember3::Provider] The provider to use from Realtime. eg: openai, google.
1410
+ #
1411
+ # @param realtime_model_id [String] The model ID to use from Realtime. eg: gpt-4.1
1412
+ #
1413
+ # @param realtime_voice_id [String] Output voice for the realtime provider (e.g. OpenAI: marin; Gemini: Puck).
1414
+ #
1415
+ # @param type [Symbol, :realtime] Use a model from Realtime.
1416
+
1417
+ # The provider to use from Realtime. eg: openai, google.
1418
+ #
1419
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::LlmModel::UnionMember3#provider
1420
+ module Provider
1421
+ extend Revox::Internal::Type::Enum
1422
+
1423
+ OPENAI = :openai
1424
+ GOOGLE = :google
1425
+
1426
+ # @!method self.values
1427
+ # @return [Array<Symbol>]
1428
+ end
1429
+ end
1430
+
1431
+ # @!method self.variants
1432
+ # @return [Array(Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::LlmModel::UnionMember0, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::LlmModel::UnionMember1, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::LlmModel::UnionMember2, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::LlmModel::UnionMember3)]
1433
+ end
1434
+
1435
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant#position
1436
+ class Position < Revox::Internal::Type::BaseModel
1437
+ # @!attribute x
1438
+ #
1439
+ # @return [Float]
1440
+ required :x, Float
1441
+
1442
+ # @!attribute y_
1443
+ #
1444
+ # @return [Float]
1445
+ required :y_, Float, api_name: :y
1446
+
1447
+ # @!method initialize(x:, y_:)
1448
+ # @param x [Float]
1449
+ # @param y_ [Float]
1450
+ end
1451
+
1452
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant#prompt_flow
1453
+ class PromptFlow < Revox::Internal::Type::BaseModel
1454
+ # @!attribute edges
1455
+ #
1456
+ # @return [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::PromptFlow::Edge>]
1457
+ required :edges,
1458
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::PromptFlow::Edge] }
1459
+
1460
+ # @!attribute nodes
1461
+ #
1462
+ # @return [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::PromptFlow::Node>]
1463
+ required :nodes,
1464
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::PromptFlow::Node] }
1465
+
1466
+ # @!method initialize(edges:, nodes:)
1467
+ # @param edges [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::PromptFlow::Edge>]
1468
+ # @param nodes [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::PromptFlow::Node>]
1469
+
1470
+ class Edge < Revox::Internal::Type::BaseModel
1471
+ # @!attribute id
1472
+ #
1473
+ # @return [String]
1474
+ required :id, String
1475
+
1476
+ # @!attribute source
1477
+ #
1478
+ # @return [String]
1479
+ required :source, String
1480
+
1481
+ # @!attribute target
1482
+ #
1483
+ # @return [String]
1484
+ required :target, String
1485
+
1486
+ # @!method initialize(id:, source:, target:)
1487
+ # @param id [String]
1488
+ # @param source [String]
1489
+ # @param target [String]
1490
+ end
1491
+
1492
+ class Node < Revox::Internal::Type::BaseModel
1493
+ # @!attribute id
1494
+ #
1495
+ # @return [String]
1496
+ required :id, String
1497
+
1498
+ # @!attribute data
1499
+ #
1500
+ # @return [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::PromptFlow::Node::Data]
1501
+ required :data,
1502
+ -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::PromptFlow::Node::Data }
1503
+
1504
+ # @!attribute position
1505
+ #
1506
+ # @return [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::PromptFlow::Node::Position]
1507
+ required :position,
1508
+ -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::PromptFlow::Node::Position }
1509
+
1510
+ # @!attribute type
1511
+ #
1512
+ # @return [Symbol, :promptBlock]
1513
+ required :type, const: :promptBlock
1514
+
1515
+ # @!method initialize(id:, data:, position:, type: :promptBlock)
1516
+ # @param id [String]
1517
+ # @param data [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::PromptFlow::Node::Data]
1518
+ # @param position [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::PromptFlow::Node::Position]
1519
+ # @param type [Symbol, :promptBlock]
1520
+
1521
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::PromptFlow::Node#data
1522
+ class Data < Revox::Internal::Type::BaseModel
1523
+ # @!attribute body
1524
+ #
1525
+ # @return [String]
1526
+ required :body, String
1527
+
1528
+ # @!attribute title
1529
+ #
1530
+ # @return [String]
1531
+ required :title, String
1532
+
1533
+ # @!method initialize(body:, title:)
1534
+ # @param body [String]
1535
+ # @param title [String]
1536
+ end
1537
+
1538
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::PromptFlow::Node#position
1539
+ class Position < Revox::Internal::Type::BaseModel
1540
+ # @!attribute x
1541
+ #
1542
+ # @return [Float]
1543
+ required :x, Float
1544
+
1545
+ # @!attribute y_
1546
+ #
1547
+ # @return [Float]
1548
+ required :y_, Float, api_name: :y
1549
+
1550
+ # @!method initialize(x:, y_:)
1551
+ # @param x [Float]
1552
+ # @param y_ [Float]
1553
+ end
1554
+ end
1555
+ end
1556
+
1557
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant#slack
1558
+ class Slack < Revox::Internal::Type::BaseModel
1559
+ # @!attribute channels
1560
+ # The Slack channels eligible to receive the notification. When more than one is
1561
+ # configured, the agent prompt may define routing rules to narrow it down per
1562
+ # call; with no such rules every channel here is notified.
1563
+ #
1564
+ # @return [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Slack::Channel>]
1565
+ required :channels,
1566
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Slack::Channel] }
1567
+
1568
+ # @!attribute connection_id
1569
+ # The Nango connection ID linking the org's Slack workspace to Revox.
1570
+ #
1571
+ # @return [String]
1572
+ required :connection_id, String
1573
+
1574
+ # @!attribute outcomes
1575
+ # Which call outcomes trigger a Slack notification (e.g. ['interested', 'none']).
1576
+ # Use 'none' to notify when outcome is null.
1577
+ #
1578
+ # @return [Array<Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Slack::Outcome>]
1579
+ required :outcomes,
1580
+ -> { Revox::Internal::Type::ArrayOf[enum: Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Slack::Outcome] }
1581
+
1582
+ # @!attribute template
1583
+ # Optional message template. Supports {{summary}}, {{outcome}}, {{phone}},
1584
+ # {{call_url}}, {{assistant_name}}, {{campaign_name}}, {{first_name}},
1585
+ # {{last_name}}, {{email}}, {{company}}, {{job_title}}, {{contact_name}},
1586
+ # {{contact_line}}, plus prompt_variables and structured_output keys. When
1587
+ # null/empty a default template is used.
1588
+ #
1589
+ # @return [String, nil]
1590
+ optional :template, String, nil?: true
1591
+
1592
+ # @!method initialize(channels:, connection_id:, outcomes:, template: nil)
1593
+ # Some parameter documentations has been truncated, see
1594
+ # {Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Slack}
1595
+ # for more details.
1596
+ #
1597
+ # @param channels [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Slack::Channel>] The Slack channels eligible to receive the notification. When more than one is c
1598
+ #
1599
+ # @param connection_id [String] The Nango connection ID linking the org's Slack workspace to Revox.
1600
+ #
1601
+ # @param outcomes [Array<Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Slack::Outcome>] Which call outcomes trigger a Slack notification (e.g. ['interested', 'none']).
1602
+ #
1603
+ # @param template [String, nil] Optional message template. Supports {{summary}}, {{outcome}}, {{phone}},
1604
+ # {{call\_
1605
+
1606
+ class Channel < Revox::Internal::Type::BaseModel
1607
+ # @!attribute id
1608
+ # The Slack channel ID (e.g. 'C01234567').
1609
+ #
1610
+ # @return [String]
1611
+ required :id, String
1612
+
1613
+ # @!attribute name
1614
+ # Human-readable Slack channel name, cached for display in the UI and given to the
1615
+ # LLM when the agent prompt routes by channel name.
1616
+ #
1617
+ # @return [String, nil]
1618
+ optional :name, String, nil?: true
1619
+
1620
+ # @!method initialize(id:, name: nil)
1621
+ # Some parameter documentations has been truncated, see
1622
+ # {Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Slack::Channel}
1623
+ # for more details.
1624
+ #
1625
+ # @param id [String] The Slack channel ID (e.g. 'C01234567').
1626
+ #
1627
+ # @param name [String, nil] Human-readable Slack channel name, cached for display in the UI and given to the
1628
+ end
1629
+
1630
+ module Outcome
1631
+ extend Revox::Internal::Type::Enum
1632
+
1633
+ NOT_INTERESTED = :not_interested
1634
+ INTERESTED = :interested
1635
+ COMPLETED = :completed
1636
+ REQUESTED_CALLBACK_LATER = :requested_callback_later
1637
+ NONE = :none
1638
+
1639
+ # @!method self.values
1640
+ # @return [Array<Symbol>]
1641
+ end
1642
+ end
1643
+
1644
+ class StructuredOutputConfig < Revox::Internal::Type::BaseModel
1645
+ # @!attribute name
1646
+ #
1647
+ # @return [String]
1648
+ required :name, String
1649
+
1650
+ # @!attribute required
1651
+ #
1652
+ # @return [Boolean]
1653
+ required :required, Revox::Internal::Type::Boolean
1654
+
1655
+ # @!attribute type
1656
+ #
1657
+ # @return [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::StructuredOutputConfig::Type]
1658
+ required :type,
1659
+ enum: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::StructuredOutputConfig::Type }
1660
+
1661
+ # @!attribute description
1662
+ #
1663
+ # @return [String, nil]
1664
+ optional :description, String
1665
+
1666
+ # @!attribute enum_options
1667
+ #
1668
+ # @return [Array<String>, nil]
1669
+ optional :enum_options, Revox::Internal::Type::ArrayOf[String]
1670
+
1671
+ # @!method initialize(name:, required:, type:, description: nil, enum_options: nil)
1672
+ # @param name [String]
1673
+ # @param required [Boolean]
1674
+ # @param type [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::StructuredOutputConfig::Type]
1675
+ # @param description [String]
1676
+ # @param enum_options [Array<String>]
1677
+
1678
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::StructuredOutputConfig#type
1679
+ module Type
1680
+ extend Revox::Internal::Type::Enum
1681
+
1682
+ STRING = :string
1683
+ NUMBER = :number
1684
+ BOOLEAN = :boolean
1685
+ ENUM = :enum
1686
+ DATE = :date
1687
+ DATETIME = :datetime
1688
+
1689
+ # @!method self.values
1690
+ # @return [Array<Symbol>]
1691
+ end
1692
+ end
1693
+
1694
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant#stt_context
1695
+ class SttContext < Revox::Internal::Type::BaseModel
1696
+ # @!attribute general
1697
+ #
1698
+ # @return [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::SttContext::General>]
1699
+ required :general,
1700
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::SttContext::General] }
1701
+
1702
+ # @!attribute terms
1703
+ #
1704
+ # @return [Array<String>]
1705
+ required :terms, Revox::Internal::Type::ArrayOf[String]
1706
+
1707
+ # @!method initialize(general:, terms:)
1708
+ # Assistant-level speech-to-text context: structured `general` key/value pairs
1709
+ # plus a list of domain `terms`. Prompt-derived context is merged in without
1710
+ # replacing existing entries.
1711
+ #
1712
+ # @param general [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::SttContext::General>]
1713
+ # @param terms [Array<String>]
1714
+
1715
+ class General < Revox::Internal::Type::BaseModel
1716
+ # @!attribute key
1717
+ #
1718
+ # @return [String]
1719
+ required :key, String
1720
+
1721
+ # @!attribute value
1722
+ #
1723
+ # @return [String]
1724
+ required :value, String
1725
+
1726
+ # @!method initialize(key:, value:)
1727
+ # @param key [String]
1728
+ # @param value [String]
1729
+ end
1730
+ end
1731
+
1732
+ # Transcriber (speech-to-text) model used for the assistant.
1733
+ #
1734
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant#stt_model
1735
+ module SttModel
1736
+ extend Revox::Internal::Type::Enum
1737
+
1738
+ STT_RT_V4 = :"stt-rt-v4"
1739
+ STT_RT_V5 = :"stt-rt-v5"
1740
+
1741
+ # @!method self.values
1742
+ # @return [Array<Symbol>]
1743
+ end
1744
+
1745
+ # Audio clip to play while the agent is processing a response. One of the built-in
1746
+ # LiveKit audio clips; null disables it.
1747
+ #
1748
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant#thinking_sound
1749
+ module ThinkingSound
1750
+ extend Revox::Internal::Type::Enum
1751
+
1752
+ CITY_AMBIENCE_OGG = :"city-ambience.ogg"
1753
+ FOREST_AMBIENCE_OGG = :"forest-ambience.ogg"
1754
+ OFFICE_AMBIENCE_OGG = :"office-ambience.ogg"
1755
+ CROWDED_ROOM_OGG = :"crowded-room.ogg"
1756
+ KEYBOARD_TYPING_OGG = :"keyboard-typing.ogg"
1757
+ KEYBOARD_TYPING2_OGG = :"keyboard-typing2.ogg"
1758
+ HOLD_MUSIC_OGG = :"hold_music.ogg"
1759
+
1760
+ # @!method self.values
1761
+ # @return [Array<Symbol>]
1762
+ end
1763
+
1764
+ class TransferDestination < Revox::Internal::Type::BaseModel
1765
+ # @!attribute label
1766
+ #
1767
+ # @return [String]
1768
+ required :label, String
1769
+
1770
+ # @!attribute phone_number
1771
+ #
1772
+ # @return [String]
1773
+ required :phone_number, String
1774
+
1775
+ # @!method initialize(label:, phone_number:)
1776
+ # @param label [String]
1777
+ # @param phone_number [String]
1778
+ end
1779
+
1780
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant#type
1781
+ module Type
1782
+ extend Revox::Internal::Type::Enum
1783
+
1784
+ STANDALONE = :standalone
1785
+ MULTI_STEP = :"multi-step"
1786
+ SUB_ASSISTANT = :"sub-assistant"
1787
+
1788
+ # @!method self.values
1789
+ # @return [Array<Symbol>]
1790
+ end
1791
+
1792
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant#voice
1793
+ class Voice < Revox::Internal::Type::BaseModel
1794
+ # @!attribute id
1795
+ # The ID of the voice.
1796
+ #
1797
+ # @return [String]
1798
+ required :id, String
1799
+
1800
+ # @!attribute provider
1801
+ # The provider of the voice.
1802
+ #
1803
+ # @return [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Voice::Provider]
1804
+ required :provider,
1805
+ enum: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Voice::Provider }
1806
+
1807
+ # @!attribute model
1808
+ # Cartesia TTS model (Cartesia only). Defaults to sonic-3 when omitted. Ignored
1809
+ # for other providers.
1810
+ #
1811
+ # @return [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Voice::Model, nil]
1812
+ optional :model,
1813
+ enum: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Voice::Model }
1814
+
1815
+ # @!attribute speed
1816
+ # The speed of the voice. Range depends on provider: Cartesia 0.6–1.5, ElevenLabs
1817
+ # 0.7–1.2, Gradium 0.6–1.5. Default is 1.0.
1818
+ #
1819
+ # @return [Float, nil]
1820
+ optional :speed, Float
1821
+
1822
+ # @!attribute volume
1823
+ # Volume of the voice (Cartesia only). 0.5–2.0, default 1.0. Ignored for other
1824
+ # providers.
1825
+ #
1826
+ # @return [Float, nil]
1827
+ optional :volume, Float
1828
+
1829
+ # @!method initialize(id:, provider:, model: nil, speed: nil, volume: nil)
1830
+ # Some parameter documentations has been truncated, see
1831
+ # {Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Voice}
1832
+ # for more details.
1833
+ #
1834
+ # @param id [String] The ID of the voice.
1835
+ #
1836
+ # @param provider [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Voice::Provider] The provider of the voice.
1837
+ #
1838
+ # @param model [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Voice::Model] Cartesia TTS model (Cartesia only). Defaults to sonic-3 when omitted. Ignored fo
1839
+ #
1840
+ # @param speed [Float] The speed of the voice. Range depends on provider: Cartesia 0.6–1.5, ElevenLabs
1841
+ #
1842
+ # @param volume [Float] Volume of the voice (Cartesia only). 0.5–2.0, default 1.0. Ignored for other pro
1843
+
1844
+ # The provider of the voice.
1845
+ #
1846
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Voice#provider
1847
+ module Provider
1848
+ extend Revox::Internal::Type::Enum
1849
+
1850
+ CARTESIA = :cartesia
1851
+ ELEVENLABS = :elevenlabs
1852
+ GRADIUM = :gradium
1853
+
1854
+ # @!method self.values
1855
+ # @return [Array<Symbol>]
1856
+ end
1857
+
1858
+ # Cartesia TTS model (Cartesia only). Defaults to sonic-3 when omitted. Ignored
1859
+ # for other providers.
1860
+ #
1861
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Voice#model
1862
+ module Model
1863
+ extend Revox::Internal::Type::Enum
1864
+
1865
+ SONIC_3 = :"sonic-3"
1866
+ SONIC_3_5 = :"sonic-3.5"
1867
+
1868
+ # @!method self.values
1869
+ # @return [Array<Symbol>]
1870
+ end
1871
+ end
1872
+
1873
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant#zoho
1874
+ class Zoho < Revox::Internal::Type::BaseModel
1875
+ # @!attribute connection_id
1876
+ # The Nango connection ID linking the org's Zoho CRM account to Revox.
1877
+ #
1878
+ # @return [String]
1879
+ required :connection_id, String
1880
+
1881
+ # @!attribute field_mapping
1882
+ # Maps extracted call fields (structured_output / prompt variables) onto Zoho
1883
+ # field API names on the upserted record.
1884
+ #
1885
+ # @return [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Zoho::FieldMapping>]
1886
+ required :field_mapping,
1887
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Zoho::FieldMapping] }
1888
+
1889
+ # @!attribute log_call_activity
1890
+ # When true, also log the call as a record in Zoho's Calls module (related to the
1891
+ # upserted prospect via Who_Id).
1892
+ #
1893
+ # @return [Boolean]
1894
+ required :log_call_activity, Revox::Internal::Type::Boolean
1895
+
1896
+ # @!attribute module_
1897
+ # Zoho module the prospect record is upserted into (e.g. 'Leads' or 'Contacts').
1898
+ #
1899
+ # @return [String]
1900
+ required :module_, String, api_name: :module
1901
+
1902
+ # @!attribute outcomes
1903
+ # Which call outcomes trigger the Zoho push (e.g. ['interested', 'none']). Use
1904
+ # 'none' to push when outcome is null.
1905
+ #
1906
+ # @return [Array<Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Zoho::Outcome>]
1907
+ required :outcomes,
1908
+ -> { Revox::Internal::Type::ArrayOf[enum: Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Zoho::Outcome] }
1909
+
1910
+ # @!attribute template
1911
+ # Optional Note body template. Supports {{summary}}, {{outcome}}, {{phone}},
1912
+ # {{call_url}}, {{assistant_name}}, {{campaign_name}}, {{transcript}}, plus
1913
+ # prompt_variables and structured_output keys. When null/empty a default note
1914
+ # (outcome + summary + auto-listed extracted fields) is used.
1915
+ #
1916
+ # @return [String, nil]
1917
+ optional :template, String, nil?: true
1918
+
1919
+ # @!method initialize(connection_id:, field_mapping:, log_call_activity:, module_:, outcomes:, template: nil)
1920
+ # Some parameter documentations has been truncated, see
1921
+ # {Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Zoho}
1922
+ # for more details.
1923
+ #
1924
+ # @param connection_id [String] The Nango connection ID linking the org's Zoho CRM account to Revox.
1925
+ #
1926
+ # @param field_mapping [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Zoho::FieldMapping>] Maps extracted call fields (structured_output / prompt variables) onto Zoho fiel
1927
+ #
1928
+ # @param log_call_activity [Boolean] When true, also log the call as a record in Zoho's Calls module (related to the
1929
+ #
1930
+ # @param module_ [String] Zoho module the prospect record is upserted into (e.g. 'Leads' or 'Contacts').
1931
+ #
1932
+ # @param outcomes [Array<Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Zoho::Outcome>] Which call outcomes trigger the Zoho push (e.g. ['interested', 'none']). Use 'no
1933
+ #
1934
+ # @param template [String, nil] Optional Note body template. Supports {{summary}}, {{outcome}}, {{phone}}, {{cal
1935
+
1936
+ class FieldMapping < Revox::Internal::Type::BaseModel
1937
+ # @!attribute source
1938
+ # Source key to read from the call: a structured_output field name, falling back
1939
+ # to a prompt variable of the same name.
1940
+ #
1941
+ # @return [String]
1942
+ required :source, String
1943
+
1944
+ # @!attribute zoho_field
1945
+ # Destination Zoho field API name on the upserted record (e.g. 'Email', 'Company',
1946
+ # or a custom 'Budget\_\_c').
1947
+ #
1948
+ # @return [String]
1949
+ required :zoho_field, String
1950
+
1951
+ # @!method initialize(source:, zoho_field:)
1952
+ # Some parameter documentations has been truncated, see
1953
+ # {Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::Zoho::FieldMapping}
1954
+ # for more details.
1955
+ #
1956
+ # @param source [String] Source key to read from the call: a structured_output field name, falling back t
1957
+ #
1958
+ # @param zoho_field [String] Destination Zoho field API name on the upserted record (e.g. 'Email', 'Company',
1959
+ end
1960
+
1961
+ module Outcome
1962
+ extend Revox::Internal::Type::Enum
1963
+
1964
+ NOT_INTERESTED = :not_interested
1965
+ INTERESTED = :interested
1966
+ COMPLETED = :completed
1967
+ REQUESTED_CALLBACK_LATER = :requested_callback_later
1968
+ NONE = :none
1969
+
1970
+ # @!method self.values
1971
+ # @return [Array<Symbol>]
1972
+ end
1973
+ end
1974
+
1975
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant#created_by
1976
+ class CreatedBy < Revox::Internal::Type::BaseModel
1977
+ # @!attribute id
1978
+ # The database user id of the creator.
1979
+ #
1980
+ # @return [String]
1981
+ required :id, String
1982
+
1983
+ # @!attribute email
1984
+ #
1985
+ # @return [String]
1986
+ required :email, String
1987
+
1988
+ # @!attribute first_name
1989
+ #
1990
+ # @return [String, nil]
1991
+ required :first_name, String, nil?: true
1992
+
1993
+ # @!attribute last_name
1994
+ #
1995
+ # @return [String, nil]
1996
+ required :last_name, String, nil?: true
1997
+
1998
+ # @!method initialize(id:, email:, first_name:, last_name:)
1999
+ # The user who created the assistant.
2000
+ #
2001
+ # @param id [String] The database user id of the creator.
2002
+ #
2003
+ # @param email [String]
2004
+ #
2005
+ # @param first_name [String, nil]
2006
+ #
2007
+ # @param last_name [String, nil]
2008
+ end
2009
+
2010
+ class FaqItem < Revox::Internal::Type::BaseModel
2011
+ # @!attribute answer
2012
+ #
2013
+ # @return [String]
2014
+ required :answer, String
2015
+
2016
+ # @!attribute question
2017
+ #
2018
+ # @return [String]
2019
+ required :question, String
2020
+
2021
+ # @!attribute id
2022
+ #
2023
+ # @return [String, nil]
2024
+ optional :id, String
2025
+
2026
+ # @!attribute needs_human_answer
2027
+ #
2028
+ # @return [Boolean, nil]
2029
+ optional :needs_human_answer, Revox::Internal::Type::Boolean
2030
+
2031
+ # @!attribute source
2032
+ #
2033
+ # @return [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::FaqItem::Source, nil]
2034
+ optional :source,
2035
+ enum: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::FaqItem::Source }
2036
+
2037
+ # @!method initialize(answer:, question:, id: nil, needs_human_answer: nil, source: nil)
2038
+ # @param answer [String]
2039
+ # @param question [String]
2040
+ # @param id [String]
2041
+ # @param needs_human_answer [Boolean]
2042
+ # @param source [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::FaqItem::Source]
2043
+
2044
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::Assistant::FaqItem#source
2045
+ module Source
2046
+ extend Revox::Internal::Type::Enum
2047
+
2048
+ HUMAN = :human
2049
+ AI = :ai
2050
+
2051
+ # @!method self.values
2052
+ # @return [Array<Symbol>]
2053
+ end
2054
+ end
2055
+ end
2056
+
2057
+ class CallAttempt < Revox::Internal::Type::BaseModel
2058
+ # @!attribute id
2059
+ # The ID of the call attempt.
2060
+ #
2061
+ # @return [String]
2062
+ required :id, String
2063
+
2064
+ # @!attribute answered_at
2065
+ # The time the call was answered.
2066
+ #
2067
+ # @return [Object]
2068
+ required :answered_at, Revox::Internal::Type::Unknown
2069
+
2070
+ # @!attribute dial_error
2071
+ # The SIP error that occurred.
2072
+ #
2073
+ # @return [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::DialError, nil]
2074
+ required :dial_error,
2075
+ enum: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::DialError },
2076
+ nil?: true
2077
+
2078
+ # @!attribute ended_at
2079
+ # The time the call ended.
2080
+ #
2081
+ # @return [Object]
2082
+ required :ended_at, Revox::Internal::Type::Unknown
2083
+
2084
+ # @!attribute handled_by_ai
2085
+ # Whether the AI agent conducted the conversation on this attempt. False for a
2086
+ # silent speed-dial probe (whose agent only detects a human) and for attempts that
2087
+ # were never answered.
2088
+ #
2089
+ # @return [Boolean]
2090
+ required :handled_by_ai, Revox::Internal::Type::Boolean
2091
+
2092
+ # @!attribute handled_by_human
2093
+ # Whether a human operator conducted (part of) this attempt — a jump-in takeover
2094
+ # or a speed-dial operator connection (both stamp human_takeover_at).
2095
+ #
2096
+ # @return [Boolean]
2097
+ required :handled_by_human, Revox::Internal::Type::Boolean
2098
+
2099
+ # @!attribute handled_by_user
2100
+ # The team member responsible for following up on this call.
2101
+ #
2102
+ # @return [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::HandledByUser, nil]
2103
+ required :handled_by_user,
2104
+ -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::HandledByUser },
2105
+ nil?: true
2106
+
2107
+ # @!attribute phone_number
2108
+ # The phone number that was called. Formatted in E.164 format. Example:
2109
+ # +1234567890
2110
+ #
2111
+ # @return [String]
2112
+ required :phone_number, String
2113
+
2114
+ # @!attribute recording_url
2115
+ # The URL of the audio recording of the call.
2116
+ #
2117
+ # @return [String, nil]
2118
+ required :recording_url, String, nil?: true
2119
+
2120
+ # @!attribute result
2121
+ #
2122
+ # @return [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::Result, nil]
2123
+ required :result,
2124
+ enum: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::Result },
2125
+ nil?: true
2126
+
2127
+ # @!attribute started_at
2128
+ # The time the call started.
2129
+ #
2130
+ # @return [Object]
2131
+ required :started_at, Revox::Internal::Type::Unknown
2132
+
2133
+ # @!attribute status
2134
+ # The status of the call attempt.
2135
+ #
2136
+ # @return [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::Status]
2137
+ required :status,
2138
+ enum: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::Status }
2139
+
2140
+ # @!attribute assistants_used
2141
+ # Assistant node ids entered during this attempt, in traversal order.
2142
+ #
2143
+ # @return [Array<String>, nil]
2144
+ optional :assistants_used, Revox::Internal::Type::ArrayOf[String], nil?: true
2145
+
2146
+ # @!attribute email_log
2147
+ # Notification emails sent in connection with the call, ordered oldest first
2148
+ # (from/to addresses, subject, sent time).
2149
+ #
2150
+ # @return [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::EmailLog>, nil]
2151
+ optional :email_log,
2152
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::EmailLog] },
2153
+ nil?: true
2154
+
2155
+ # @!attribute end_reason
2156
+ # Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call',
2157
+ # 'voicemail', 'transfer', 'ivr_no_navigate'.
2158
+ #
2159
+ # @return [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::EndReason, nil]
2160
+ optional :end_reason,
2161
+ enum: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::EndReason },
2162
+ nil?: true
2163
+
2164
+ # @!attribute ended_by
2165
+ # Who ended the call: 'agent' (AI agent), 'user' (caller/callee hung up), or
2166
+ # 'system' (e.g. max duration limit).
2167
+ #
2168
+ # @return [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::EndedBy, nil]
2169
+ optional :ended_by,
2170
+ enum: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::EndedBy },
2171
+ nil?: true
2172
+
2173
+ # @!attribute post_call_transcript
2174
+ # Higher-quality transcript generated after the call via Soniox async STT. Null
2175
+ # until generated or when no recording is available.
2176
+ #
2177
+ # @return [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::PostCallTranscript>, nil]
2178
+ optional :post_call_transcript,
2179
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::PostCallTranscript] },
2180
+ nil?: true
2181
+
2182
+ # @!attribute sms_log
2183
+ # Automatic SMS sent after the call (voicemail and after-call), ordered oldest
2184
+ # first. The in-call `send_sms` is excluded — it already appears in the transcript
2185
+ # as a tool call.
2186
+ #
2187
+ # @return [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::SMSLog>, nil]
2188
+ optional :sms_log,
2189
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::SMSLog] },
2190
+ nil?: true
2191
+
2192
+ # @!attribute speech_events
2193
+ # Per-turn speech segments (VAD-derived) with timing and pipeline latencies,
2194
+ # ordered by started_speaking_at_ms. Empty for calls recorded before this was
2195
+ # tracked or for realtime sessions that don't emit them.
2196
+ #
2197
+ # @return [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::SpeechEvent>, nil]
2198
+ optional :speech_events,
2199
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::SpeechEvent] },
2200
+ nil?: true
2201
+
2202
+ # @!attribute structured_output
2203
+ # The data extracted from the call, using the structured output config from the
2204
+ # parent call object.
2205
+ #
2206
+ # @return [Hash{Symbol=>Object}, nil]
2207
+ optional :structured_output,
2208
+ Revox::Internal::Type::HashOf[Revox::Internal::Type::Unknown],
2209
+ nil?: true
2210
+
2211
+ # @!attribute transcript
2212
+ # The live transcript of the call, built in real time.
2213
+ #
2214
+ # @return [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::Transcript>, nil]
2215
+ optional :transcript,
2216
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::Transcript] },
2217
+ nil?: true
2218
+
2219
+ # @!method initialize(id:, answered_at:, dial_error:, ended_at:, handled_by_ai:, handled_by_human:, handled_by_user:, phone_number:, recording_url:, result:, started_at:, status:, assistants_used: nil, email_log: nil, end_reason: nil, ended_by: nil, post_call_transcript: nil, sms_log: nil, speech_events: nil, structured_output: nil, transcript: nil)
2220
+ # Some parameter documentations has been truncated, see
2221
+ # {Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt} for
2222
+ # more details.
2223
+ #
2224
+ # This represent a single call attempt. A call attempt is a single call made to
2225
+ # the phone number.
2226
+ #
2227
+ # @param id [String] The ID of the call attempt.
2228
+ #
2229
+ # @param answered_at [Object] The time the call was answered.
2230
+ #
2231
+ # @param dial_error [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::DialError, nil] The SIP error that occurred.
2232
+ #
2233
+ # @param ended_at [Object] The time the call ended.
2234
+ #
2235
+ # @param handled_by_ai [Boolean] Whether the AI agent conducted the conversation on this attempt. False for a sil
2236
+ #
2237
+ # @param handled_by_human [Boolean] Whether a human operator conducted (part of) this attempt — a jump-in takeover o
2238
+ #
2239
+ # @param handled_by_user [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::HandledByUser, nil] The team member responsible for following up on this call.
2240
+ #
2241
+ # @param phone_number [String] The phone number that was called. Formatted in E.164 format. Example: +123456789
2242
+ #
2243
+ # @param recording_url [String, nil] The URL of the audio recording of the call.
2244
+ #
2245
+ # @param result [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::Result, nil]
2246
+ #
2247
+ # @param started_at [Object] The time the call started.
2248
+ #
2249
+ # @param status [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::Status] The status of the call attempt.
2250
+ #
2251
+ # @param assistants_used [Array<String>, nil] Assistant node ids entered during this attempt, in traversal order.
2252
+ #
2253
+ # @param email_log [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::EmailLog>, nil] Notification emails sent in connection with the call, ordered oldest first (from
2254
+ #
2255
+ # @param end_reason [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::EndReason, nil] Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call', 'voic
2256
+ #
2257
+ # @param ended_by [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::EndedBy, nil] Who ended the call: 'agent' (AI agent), 'user' (caller/callee hung up), or 'syst
2258
+ #
2259
+ # @param post_call_transcript [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::PostCallTranscript>, nil] Higher-quality transcript generated after the call via Soniox async STT. Null un
2260
+ #
2261
+ # @param sms_log [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::SMSLog>, nil] Automatic SMS sent after the call (voicemail and after-call), ordered oldest fir
2262
+ #
2263
+ # @param speech_events [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::SpeechEvent>, nil] Per-turn speech segments (VAD-derived) with timing and pipeline latencies, order
2264
+ #
2265
+ # @param structured_output [Hash{Symbol=>Object}, nil] The data extracted from the call, using the structured output config from the pa
2266
+ #
2267
+ # @param transcript [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::Transcript>, nil] The live transcript of the call, built in real time.
2268
+
2269
+ # The SIP error that occurred.
2270
+ #
2271
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt#dial_error
2272
+ module DialError
2273
+ extend Revox::Internal::Type::Enum
2274
+
2275
+ NUMBER_NON_ATTRIBUTED = :number_non_attributed
2276
+ TOO_MANY_CALLS = :too_many_calls
2277
+ BUSY = :busy
2278
+ TEMPORARILY_UNAVAILABLE = :temporarily_unavailable
2279
+ NO_ANSWER = :no_answer
2280
+ NO_INTERNATIONAL_PERMISSION = :no_international_permission
2281
+ PRECONDITION_FAILED = :precondition_failed
2282
+ NON_CLASSIFIED_ERROR = :non_classified_error
2283
+
2284
+ # @!method self.values
2285
+ # @return [Array<Symbol>]
2286
+ end
2287
+
2288
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt#handled_by_user
2289
+ class HandledByUser < Revox::Internal::Type::BaseModel
2290
+ # @!attribute id
2291
+ # The database user id of the assignee.
2292
+ #
2293
+ # @return [String]
2294
+ required :id, String
2295
+
2296
+ # @!attribute email
2297
+ #
2298
+ # @return [String]
2299
+ required :email, String
2300
+
2301
+ # @!attribute first_name
2302
+ #
2303
+ # @return [String, nil]
2304
+ required :first_name, String, nil?: true
2305
+
2306
+ # @!attribute last_name
2307
+ #
2308
+ # @return [String, nil]
2309
+ required :last_name, String, nil?: true
2310
+
2311
+ # @!method initialize(id:, email:, first_name:, last_name:)
2312
+ # The team member responsible for following up on this call.
2313
+ #
2314
+ # @param id [String] The database user id of the assignee.
2315
+ #
2316
+ # @param email [String]
2317
+ #
2318
+ # @param first_name [String, nil]
2319
+ #
2320
+ # @param last_name [String, nil]
2321
+ end
2322
+
2323
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt#result
2324
+ module Result
2325
+ extend Revox::Internal::Type::Enum
2326
+
2327
+ IVR = :IVR
2328
+ VOICEMAIL = :voicemail
2329
+ HUMAN = :human
2330
+ UNKNOWN = :unknown
2331
+ IOS_SCREENING_FILTER = :"ios-screening-filter"
2332
+
2333
+ # @!method self.values
2334
+ # @return [Array<Symbol>]
2335
+ end
2336
+
2337
+ # The status of the call attempt.
2338
+ #
2339
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt#status
2340
+ module Status
2341
+ extend Revox::Internal::Type::Enum
2342
+
2343
+ QUEUED = :queued
2344
+ RINGING = :ringing
2345
+ ONGOING = :ongoing
2346
+ COMPLETED = :completed
2347
+ ERROR = :error
2348
+
2349
+ # @!method self.values
2350
+ # @return [Array<Symbol>]
2351
+ end
2352
+
2353
+ class EmailLog < Revox::Internal::Type::BaseModel
2354
+ # @!attribute id
2355
+ #
2356
+ # @return [String]
2357
+ required :id, String
2358
+
2359
+ # @!attribute created_at
2360
+ # When the email was sent.
2361
+ #
2362
+ # @return [Object]
2363
+ required :created_at, Revox::Internal::Type::Unknown
2364
+
2365
+ # @!attribute from_address
2366
+ #
2367
+ # @return [String]
2368
+ required :from_address, String
2369
+
2370
+ # @!attribute resend_message_id
2371
+ #
2372
+ # @return [String, nil]
2373
+ required :resend_message_id, String, nil?: true
2374
+
2375
+ # @!attribute subject
2376
+ #
2377
+ # @return [String]
2378
+ required :subject, String
2379
+
2380
+ # @!attribute to_emails
2381
+ #
2382
+ # @return [Array<String>]
2383
+ required :to_emails, Revox::Internal::Type::ArrayOf[String]
2384
+
2385
+ # @!method initialize(id:, created_at:, from_address:, resend_message_id:, subject:, to_emails:)
2386
+ # @param id [String]
2387
+ #
2388
+ # @param created_at [Object] When the email was sent.
2389
+ #
2390
+ # @param from_address [String]
2391
+ #
2392
+ # @param resend_message_id [String, nil]
2393
+ #
2394
+ # @param subject [String]
2395
+ #
2396
+ # @param to_emails [Array<String>]
2397
+ end
2398
+
2399
+ # Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call',
2400
+ # 'voicemail', 'transfer', 'ivr_no_navigate'.
2401
+ #
2402
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt#end_reason
2403
+ module EndReason
2404
+ extend Revox::Internal::Type::Enum
2405
+
2406
+ CLIENT_INITIATED = :client_initiated
2407
+ CONNECTION_TIMEOUT = :connection_timeout
2408
+ HUMAN_TAKEOVER = :human_takeover
2409
+ IVR_NO_NAVIGATE = :ivr_no_navigate
2410
+ MAX_DURATION = :max_duration
2411
+ PARTICIPANT_REMOVED = :participant_removed
2412
+ TOOL_END_CALL = :tool_end_call
2413
+ TRANSFER = :transfer
2414
+ USER_INACTIVE = :user_inactive
2415
+ USER_REJECTED = :user_rejected
2416
+ USER_UNAVAILABLE = :user_unavailable
2417
+ VOICEMAIL = :voicemail
2418
+ SPEED_DIAL_ABANDONED = :speed_dial_abandoned
2419
+ SPEED_DIAL_OPERATOR_MISSED = :speed_dial_operator_missed
2420
+ SPEED_DIAL_TIMEOUT = :speed_dial_timeout
2421
+ SPEED_DIAL_HANGUP = :speed_dial_hangup
2422
+
2423
+ # @!method self.values
2424
+ # @return [Array<Symbol>]
2425
+ end
2426
+
2427
+ # Who ended the call: 'agent' (AI agent), 'user' (caller/callee hung up), or
2428
+ # 'system' (e.g. max duration limit).
2429
+ #
2430
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt#ended_by
2431
+ module EndedBy
2432
+ extend Revox::Internal::Type::Enum
2433
+
2434
+ AGENT = :agent
2435
+ USER = :user
2436
+ SYSTEM = :system
2437
+
2438
+ # @!method self.values
2439
+ # @return [Array<Symbol>]
2440
+ end
2441
+
2442
+ class PostCallTranscript < Revox::Internal::Type::BaseModel
2443
+ # @!attribute content
2444
+ #
2445
+ # @return [String]
2446
+ required :content, String
2447
+
2448
+ # @!attribute role
2449
+ #
2450
+ # @return [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::PostCallTranscript::Role]
2451
+ required :role,
2452
+ enum: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::PostCallTranscript::Role }
2453
+
2454
+ # @!attribute tool_arguments
2455
+ #
2456
+ # @return [Hash{Symbol=>Object}, String, nil]
2457
+ optional :tool_arguments,
2458
+ union: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::PostCallTranscript::ToolArguments }
2459
+
2460
+ # @!attribute tool_is_error
2461
+ #
2462
+ # @return [Boolean, nil]
2463
+ optional :tool_is_error, Revox::Internal::Type::Boolean
2464
+
2465
+ # @!attribute tool_name
2466
+ #
2467
+ # @return [String, nil]
2468
+ optional :tool_name, String
2469
+
2470
+ # @!attribute tool_output
2471
+ #
2472
+ # @return [String, nil]
2473
+ optional :tool_output, String
2474
+
2475
+ # @!method initialize(content:, role:, tool_arguments: nil, tool_is_error: nil, tool_name: nil, tool_output: nil)
2476
+ # @param content [String]
2477
+ # @param role [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::PostCallTranscript::Role]
2478
+ # @param tool_arguments [Hash{Symbol=>Object}, String]
2479
+ # @param tool_is_error [Boolean]
2480
+ # @param tool_name [String]
2481
+ # @param tool_output [String]
2482
+
2483
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::PostCallTranscript#role
2484
+ module Role
2485
+ extend Revox::Internal::Type::Enum
2486
+
2487
+ USER = :user
2488
+ ASSISTANT = :assistant
2489
+ HUMAN_AGENT = :human_agent
2490
+ TOOL = :tool
2491
+
2492
+ # @!method self.values
2493
+ # @return [Array<Symbol>]
2494
+ end
2495
+
2496
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::PostCallTranscript#tool_arguments
2497
+ module ToolArguments
2498
+ extend Revox::Internal::Type::Union
2499
+
2500
+ variant -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::PostCallTranscript::ToolArguments::UnionMember0Map }
2501
+
2502
+ variant String
2503
+
2504
+ # @!method self.variants
2505
+ # @return [Array(Hash{Symbol=>Object}, String)]
2506
+
2507
+ # @type [Revox::Internal::Type::Converter]
2508
+ UnionMember0Map = Revox::Internal::Type::HashOf[Revox::Internal::Type::Unknown]
2509
+ end
2510
+ end
2511
+
2512
+ class SMSLog < Revox::Internal::Type::BaseModel
2513
+ # @!attribute id
2514
+ #
2515
+ # @return [String]
2516
+ required :id, String
2517
+
2518
+ # @!attribute created_at
2519
+ # When the SMS was sent.
2520
+ #
2521
+ # @return [Object]
2522
+ required :created_at, Revox::Internal::Type::Unknown
2523
+
2524
+ # @!attribute message_body
2525
+ #
2526
+ # @return [String]
2527
+ required :message_body, String
2528
+
2529
+ # @!attribute provider
2530
+ #
2531
+ # @return [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::SMSLog::Provider]
2532
+ required :provider,
2533
+ enum: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::SMSLog::Provider }
2534
+
2535
+ # @!attribute provider_message_id
2536
+ #
2537
+ # @return [String, nil]
2538
+ required :provider_message_id, String, nil?: true
2539
+
2540
+ # @!attribute to_phone_number
2541
+ #
2542
+ # @return [String]
2543
+ required :to_phone_number, String
2544
+
2545
+ # @!attribute type
2546
+ #
2547
+ # @return [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::SMSLog::Type]
2548
+ required :type,
2549
+ enum: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::SMSLog::Type }
2550
+
2551
+ # @!method initialize(id:, created_at:, message_body:, provider:, provider_message_id:, to_phone_number:, type:)
2552
+ # @param id [String]
2553
+ #
2554
+ # @param created_at [Object] When the SMS was sent.
2555
+ #
2556
+ # @param message_body [String]
2557
+ #
2558
+ # @param provider [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::SMSLog::Provider]
2559
+ #
2560
+ # @param provider_message_id [String, nil]
2561
+ #
2562
+ # @param to_phone_number [String]
2563
+ #
2564
+ # @param type [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::SMSLog::Type]
2565
+
2566
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::SMSLog#provider
2567
+ module Provider
2568
+ extend Revox::Internal::Type::Enum
2569
+
2570
+ TWILIO = :twilio
2571
+ VONAGE = :vonage
2572
+
2573
+ # @!method self.values
2574
+ # @return [Array<Symbol>]
2575
+ end
2576
+
2577
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::SMSLog#type
2578
+ module Type
2579
+ extend Revox::Internal::Type::Enum
2580
+
2581
+ IN_CALL = :in_call
2582
+ VOICEMAIL = :voicemail
2583
+ AFTER_CALL = :after_call
2584
+
2585
+ # @!method self.values
2586
+ # @return [Array<Symbol>]
2587
+ end
2588
+ end
2589
+
2590
+ class SpeechEvent < Revox::Internal::Type::BaseModel
2591
+ # @!attribute id
2592
+ #
2593
+ # @return [String]
2594
+ required :id, String
2595
+
2596
+ # @!attribute is_real_turn
2597
+ # False when the segment was flagged as noise/blip rather than a meaningful turn.
2598
+ #
2599
+ # @return [Boolean]
2600
+ required :is_real_turn, Revox::Internal::Type::Boolean
2601
+
2602
+ # @!attribute llm_system_prompt
2603
+ # Agent-only: despite the name, the whole prompt the LLM was given for this turn —
2604
+ # system instructions plus conversation history — as JSON.
2605
+ #
2606
+ # @return [String, nil]
2607
+ required :llm_system_prompt, String, nil?: true
2608
+
2609
+ # @!attribute llm_ttft_ms
2610
+ # Agent-only: LLM time-to-first-token for the reply, in ms.
2611
+ #
2612
+ # @return [Float, nil]
2613
+ required :llm_ttft_ms, Float, nil?: true
2614
+
2615
+ # @!attribute llm_winner_model
2616
+ # Agent-only: the model that produced the reply — the winning leg when the LLM is
2617
+ # a race, which is also the model `llm_ttft_ms` describes.
2618
+ #
2619
+ # @return [String, nil]
2620
+ required :llm_winner_model, String, nil?: true
2621
+
2622
+ # @!attribute speaker
2623
+ # Who was speaking during this segment.
2624
+ #
2625
+ # @return [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::SpeechEvent::Speaker]
2626
+ required :speaker,
2627
+ enum: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::SpeechEvent::Speaker }
2628
+
2629
+ # @!attribute started_speaking_at_ms
2630
+ # Milliseconds since session start when speech began.
2631
+ #
2632
+ # @return [Float]
2633
+ required :started_speaking_at_ms, Float
2634
+
2635
+ # @!attribute stopped_speaking_at_ms
2636
+ # Milliseconds since session start when speech ended. Null when the session ended
2637
+ # before the turn closed.
2638
+ #
2639
+ # @return [Float, nil]
2640
+ required :stopped_speaking_at_ms, Float, nil?: true
2641
+
2642
+ # @!attribute stt_transcription_delay_ms
2643
+ # User-only: time from end-of-speech to final transcript, in ms.
2644
+ #
2645
+ # @return [Float, nil]
2646
+ required :stt_transcription_delay_ms, Float, nil?: true
2647
+
2648
+ # @!attribute transcript
2649
+ # Recognized text for this segment, when available.
2650
+ #
2651
+ # @return [String, nil]
2652
+ required :transcript, String, nil?: true
2653
+
2654
+ # @!attribute tts_ttfb_ms
2655
+ # Agent-only: TTS time-to-first-audio-byte for the reply, in ms.
2656
+ #
2657
+ # @return [Float, nil]
2658
+ required :tts_ttfb_ms, Float, nil?: true
2659
+
2660
+ # @!attribute was_cut
2661
+ # Agent-only: true when the agent's audio was interrupted (real or auto-resumed).
2662
+ # Null on user segments.
2663
+ #
2664
+ # @return [Boolean, nil]
2665
+ required :was_cut, Revox::Internal::Type::Boolean, nil?: true
2666
+
2667
+ # @!method initialize(id:, is_real_turn:, llm_system_prompt:, llm_ttft_ms:, llm_winner_model:, speaker:, started_speaking_at_ms:, stopped_speaking_at_ms:, stt_transcription_delay_ms:, transcript:, tts_ttfb_ms:, was_cut:)
2668
+ # Some parameter documentations has been truncated, see
2669
+ # {Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::SpeechEvent}
2670
+ # for more details.
2671
+ #
2672
+ # @param id [String]
2673
+ #
2674
+ # @param is_real_turn [Boolean] False when the segment was flagged as noise/blip rather than a meaningful turn.
2675
+ #
2676
+ # @param llm_system_prompt [String, nil] Agent-only: despite the name, the whole prompt the LLM was given for this turn —
2677
+ #
2678
+ # @param llm_ttft_ms [Float, nil] Agent-only: LLM time-to-first-token for the reply, in ms.
2679
+ #
2680
+ # @param llm_winner_model [String, nil] Agent-only: the model that produced the reply — the winning leg when the LLM is
2681
+ #
2682
+ # @param speaker [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::SpeechEvent::Speaker] Who was speaking during this segment.
2683
+ #
2684
+ # @param started_speaking_at_ms [Float] Milliseconds since session start when speech began.
2685
+ #
2686
+ # @param stopped_speaking_at_ms [Float, nil] Milliseconds since session start when speech ended. Null when the session ended
2687
+ #
2688
+ # @param stt_transcription_delay_ms [Float, nil] User-only: time from end-of-speech to final transcript, in ms.
2689
+ #
2690
+ # @param transcript [String, nil] Recognized text for this segment, when available.
2691
+ #
2692
+ # @param tts_ttfb_ms [Float, nil] Agent-only: TTS time-to-first-audio-byte for the reply, in ms.
2693
+ #
2694
+ # @param was_cut [Boolean, nil] Agent-only: true when the agent's audio was interrupted (real or auto-resumed).
2695
+
2696
+ # Who was speaking during this segment.
2697
+ #
2698
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::SpeechEvent#speaker
2699
+ module Speaker
2700
+ extend Revox::Internal::Type::Enum
2701
+
2702
+ USER = :user
2703
+ AGENT = :agent
2704
+
2705
+ # @!method self.values
2706
+ # @return [Array<Symbol>]
2707
+ end
2708
+ end
2709
+
2710
+ class Transcript < Revox::Internal::Type::BaseModel
2711
+ # @!attribute content
2712
+ #
2713
+ # @return [String]
2714
+ required :content, String
2715
+
2716
+ # @!attribute role
2717
+ #
2718
+ # @return [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::Transcript::Role]
2719
+ required :role,
2720
+ enum: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::Transcript::Role }
2721
+
2722
+ # @!attribute tool_arguments
2723
+ #
2724
+ # @return [Hash{Symbol=>Object}, String, nil]
2725
+ optional :tool_arguments,
2726
+ union: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::Transcript::ToolArguments }
2727
+
2728
+ # @!attribute tool_is_error
2729
+ #
2730
+ # @return [Boolean, nil]
2731
+ optional :tool_is_error, Revox::Internal::Type::Boolean
2732
+
2733
+ # @!attribute tool_name
2734
+ #
2735
+ # @return [String, nil]
2736
+ optional :tool_name, String
2737
+
2738
+ # @!attribute tool_output
2739
+ #
2740
+ # @return [String, nil]
2741
+ optional :tool_output, String
2742
+
2743
+ # @!method initialize(content:, role:, tool_arguments: nil, tool_is_error: nil, tool_name: nil, tool_output: nil)
2744
+ # @param content [String]
2745
+ # @param role [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::Transcript::Role]
2746
+ # @param tool_arguments [Hash{Symbol=>Object}, String]
2747
+ # @param tool_is_error [Boolean]
2748
+ # @param tool_name [String]
2749
+ # @param tool_output [String]
2750
+
2751
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::Transcript#role
2752
+ module Role
2753
+ extend Revox::Internal::Type::Enum
2754
+
2755
+ USER = :user
2756
+ ASSISTANT = :assistant
2757
+ HUMAN_AGENT = :human_agent
2758
+ TOOL = :tool
2759
+
2760
+ # @!method self.values
2761
+ # @return [Array<Symbol>]
2762
+ end
2763
+
2764
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::Transcript#tool_arguments
2765
+ module ToolArguments
2766
+ extend Revox::Internal::Type::Union
2767
+
2768
+ variant -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallAttempt::Transcript::ToolArguments::UnionMember0Map }
2769
+
2770
+ variant String
2771
+
2772
+ # @!method self.variants
2773
+ # @return [Array(Hash{Symbol=>Object}, String)]
2774
+
2775
+ # @type [Revox::Internal::Type::Converter]
2776
+ UnionMember0Map = Revox::Internal::Type::HashOf[Revox::Internal::Type::Unknown]
2777
+ end
2778
+ end
2779
+ end
2780
+
2781
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall#call_retry_config
2782
+ class CallRetryConfig < Revox::Internal::Type::BaseModel
2783
+ # @!attribute allowed_days
2784
+ # Days of the week when calls are allowed, in the recipient's timezone. Default:
2785
+ # Monday through Friday.
2786
+ #
2787
+ # @return [Array<Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallRetryConfig::AllowedDay>]
2788
+ required :allowed_days,
2789
+ -> { Revox::Internal::Type::ArrayOf[enum: Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallRetryConfig::AllowedDay] }
2790
+
2791
+ # @!attribute call_twice_in_a_row
2792
+ # If true and max_retry_attempts >= 2, attempt #2 fires immediately (skipping
2793
+ # retry_delay_seconds) when attempt #1 didn't reach a human.
2794
+ # Calling-window/allowed-days checks still apply. Only affects the 1→2 transition.
2795
+ # Default: false.
2796
+ #
2797
+ # @return [Boolean]
2798
+ required :call_twice_in_a_row, Revox::Internal::Type::Boolean
2799
+
2800
+ # @!attribute calling_windows
2801
+ #
2802
+ # @return [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallRetryConfig::CallingWindow>]
2803
+ required :calling_windows,
2804
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallRetryConfig::CallingWindow] }
2805
+
2806
+ # @!attribute max_retry_attempts
2807
+ # Maximum number of call retry attempts. Default: 3.
2808
+ #
2809
+ # @return [Integer]
2810
+ required :max_retry_attempts, Integer
2811
+
2812
+ # @!attribute timezone
2813
+ # Optional IANA timezone identifier to override the automatic timezone detection
2814
+ # from phone number. If not provided, timezone is determined from the recipient's
2815
+ # phone number country code. Examples: 'America/New_York', 'Europe/Paris'.
2816
+ #
2817
+ # @return [String, nil]
2818
+ optional :timezone, String, nil?: true
2819
+
2820
+ # @!method initialize(allowed_days:, call_twice_in_a_row:, calling_windows:, max_retry_attempts:, timezone: nil)
2821
+ # Some parameter documentations has been truncated, see
2822
+ # {Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallRetryConfig}
2823
+ # for more details.
2824
+ #
2825
+ # Configuration for call retry behavior including time windows, delays, and max
2826
+ # iterations. If not provided, defaults will be used.
2827
+ #
2828
+ # @param allowed_days [Array<Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallRetryConfig::AllowedDay>] Days of the week when calls are allowed, in the recipient's timezone. Default: M
2829
+ #
2830
+ # @param call_twice_in_a_row [Boolean] If true and max_retry_attempts >= 2, attempt #2 fires immediately (skipping retr
2831
+ #
2832
+ # @param calling_windows [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallRetryConfig::CallingWindow>]
2833
+ #
2834
+ # @param max_retry_attempts [Integer] Maximum number of call retry attempts. Default: 3.
2835
+ #
2836
+ # @param timezone [String, nil] Optional IANA timezone identifier to override the automatic timezone detection f
2837
+
2838
+ module AllowedDay
2839
+ extend Revox::Internal::Type::Enum
2840
+
2841
+ MONDAY = :monday
2842
+ TUESDAY = :tuesday
2843
+ WEDNESDAY = :wednesday
2844
+ THURSDAY = :thursday
2845
+ FRIDAY = :friday
2846
+ SATURDAY = :saturday
2847
+ SUNDAY = :sunday
2848
+
2849
+ # @!method self.values
2850
+ # @return [Array<Symbol>]
2851
+ end
2852
+
2853
+ class CallingWindow < Revox::Internal::Type::BaseModel
2854
+ # @!attribute calling_window_end_time
2855
+ # End time for the calling window in the recipient's timezone (or
2856
+ # timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
2857
+ # Examples: '17:00', '6pm'. Default: '18:00'.
2858
+ #
2859
+ # @return [String]
2860
+ required :calling_window_end_time, String
2861
+
2862
+ # @!attribute calling_window_start_time
2863
+ # Start time for the calling window in the recipient's timezone (or
2864
+ # timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
2865
+ # Examples: '09:00', '10am'. Default: '10:00'.
2866
+ #
2867
+ # @return [String]
2868
+ required :calling_window_start_time, String
2869
+
2870
+ # @!attribute retry_delay_seconds
2871
+ # Delay between retry attempts in seconds. 0 retries as soon as the calling window
2872
+ # allows. Default: 7200 (2 hours).
2873
+ #
2874
+ # @return [Integer]
2875
+ required :retry_delay_seconds, Integer
2876
+
2877
+ # @!method initialize(calling_window_end_time:, calling_window_start_time:, retry_delay_seconds:)
2878
+ # Some parameter documentations has been truncated, see
2879
+ # {Revox::Models::CampaignLaunchResponse::Session::InFlightCall::CallRetryConfig::CallingWindow}
2880
+ # for more details.
2881
+ #
2882
+ # @param calling_window_end_time [String] End time for the calling window in the recipient's timezone (or timezone_overrid
2883
+ #
2884
+ # @param calling_window_start_time [String] Start time for the calling window in the recipient's timezone (or timezone_overr
2885
+ #
2886
+ # @param retry_delay_seconds [Integer] Delay between retry attempts in seconds. 0 retries as soon as the calling window
2887
+ end
2888
+ end
2889
+
2890
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall#campaign
2891
+ class Campaign < Revox::Internal::Type::BaseModel
2892
+ # @!attribute id
2893
+ #
2894
+ # @return [String]
2895
+ required :id, String
2896
+
2897
+ # @!attribute name
2898
+ #
2899
+ # @return [String]
2900
+ required :name, String
2901
+
2902
+ # @!method initialize(id:, name:)
2903
+ # @param id [String]
2904
+ # @param name [String]
2905
+ end
2906
+
2907
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall#contact
2908
+ class Contact < Revox::Internal::Type::BaseModel
2909
+ # @!attribute company
2910
+ #
2911
+ # @return [String, nil]
2912
+ required :company, String, nil?: true
2913
+
2914
+ # @!attribute email
2915
+ #
2916
+ # @return [String, nil]
2917
+ required :email, String, nil?: true
2918
+
2919
+ # @!attribute first_name
2920
+ #
2921
+ # @return [String, nil]
2922
+ required :first_name, String, nil?: true
2923
+
2924
+ # @!attribute job_title
2925
+ #
2926
+ # @return [String, nil]
2927
+ required :job_title, String, nil?: true
2928
+
2929
+ # @!attribute last_name
2930
+ #
2931
+ # @return [String, nil]
2932
+ required :last_name, String, nil?: true
2933
+
2934
+ # @!method initialize(company:, email:, first_name:, job_title:, last_name:)
2935
+ # Magic contact variables (prospect identity) extracted from the call's input data
2936
+ # and transcript.
2937
+ #
2938
+ # @param company [String, nil]
2939
+ # @param email [String, nil]
2940
+ # @param first_name [String, nil]
2941
+ # @param job_title [String, nil]
2942
+ # @param last_name [String, nil]
2943
+ end
2944
+
2945
+ # Whether the call is inbound or outbound.
2946
+ #
2947
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall#direction
2948
+ module Direction
2949
+ extend Revox::Internal::Type::Enum
2950
+
2951
+ INBOUND = :inbound
2952
+ OUTBOUND = :outbound
2953
+
2954
+ # @!method self.values
2955
+ # @return [Array<Symbol>]
2956
+ end
2957
+
2958
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall#last_call_attempt
2959
+ class LastCallAttempt < Revox::Internal::Type::BaseModel
2960
+ # @!attribute id
2961
+ # The ID of the call attempt.
2962
+ #
2963
+ # @return [String]
2964
+ required :id, String
2965
+
2966
+ # @!attribute answered_at
2967
+ # The time the call was answered.
2968
+ #
2969
+ # @return [Object]
2970
+ required :answered_at, Revox::Internal::Type::Unknown
2971
+
2972
+ # @!attribute dial_error
2973
+ # The SIP error that occurred.
2974
+ #
2975
+ # @return [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::DialError, nil]
2976
+ required :dial_error,
2977
+ enum: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::DialError },
2978
+ nil?: true
2979
+
2980
+ # @!attribute ended_at
2981
+ # The time the call ended.
2982
+ #
2983
+ # @return [Object]
2984
+ required :ended_at, Revox::Internal::Type::Unknown
2985
+
2986
+ # @!attribute handled_by_ai
2987
+ # Whether the AI agent conducted the conversation on this attempt. False for a
2988
+ # silent speed-dial probe (whose agent only detects a human) and for attempts that
2989
+ # were never answered.
2990
+ #
2991
+ # @return [Boolean]
2992
+ required :handled_by_ai, Revox::Internal::Type::Boolean
2993
+
2994
+ # @!attribute handled_by_human
2995
+ # Whether a human operator conducted (part of) this attempt — a jump-in takeover
2996
+ # or a speed-dial operator connection (both stamp human_takeover_at).
2997
+ #
2998
+ # @return [Boolean]
2999
+ required :handled_by_human, Revox::Internal::Type::Boolean
3000
+
3001
+ # @!attribute handled_by_user
3002
+ # The team member responsible for following up on this call.
3003
+ #
3004
+ # @return [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::HandledByUser, nil]
3005
+ required :handled_by_user,
3006
+ -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::HandledByUser },
3007
+ nil?: true
3008
+
3009
+ # @!attribute phone_number
3010
+ # The phone number that was called. Formatted in E.164 format. Example:
3011
+ # +1234567890
3012
+ #
3013
+ # @return [String]
3014
+ required :phone_number, String
3015
+
3016
+ # @!attribute recording_url
3017
+ # The URL of the audio recording of the call.
3018
+ #
3019
+ # @return [String, nil]
3020
+ required :recording_url, String, nil?: true
3021
+
3022
+ # @!attribute result
3023
+ #
3024
+ # @return [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::Result, nil]
3025
+ required :result,
3026
+ enum: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::Result },
3027
+ nil?: true
3028
+
3029
+ # @!attribute started_at
3030
+ # The time the call started.
3031
+ #
3032
+ # @return [Object]
3033
+ required :started_at, Revox::Internal::Type::Unknown
3034
+
3035
+ # @!attribute status
3036
+ # The status of the call attempt.
3037
+ #
3038
+ # @return [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::Status]
3039
+ required :status,
3040
+ enum: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::Status }
3041
+
3042
+ # @!attribute assistants_used
3043
+ # Assistant node ids entered during this attempt, in traversal order.
3044
+ #
3045
+ # @return [Array<String>, nil]
3046
+ optional :assistants_used, Revox::Internal::Type::ArrayOf[String], nil?: true
3047
+
3048
+ # @!attribute email_log
3049
+ # Notification emails sent in connection with the call, ordered oldest first
3050
+ # (from/to addresses, subject, sent time).
3051
+ #
3052
+ # @return [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::EmailLog>, nil]
3053
+ optional :email_log,
3054
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::EmailLog] },
3055
+ nil?: true
3056
+
3057
+ # @!attribute end_reason
3058
+ # Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call',
3059
+ # 'voicemail', 'transfer', 'ivr_no_navigate'.
3060
+ #
3061
+ # @return [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::EndReason, nil]
3062
+ optional :end_reason,
3063
+ enum: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::EndReason },
3064
+ nil?: true
3065
+
3066
+ # @!attribute ended_by
3067
+ # Who ended the call: 'agent' (AI agent), 'user' (caller/callee hung up), or
3068
+ # 'system' (e.g. max duration limit).
3069
+ #
3070
+ # @return [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::EndedBy, nil]
3071
+ optional :ended_by,
3072
+ enum: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::EndedBy },
3073
+ nil?: true
3074
+
3075
+ # @!attribute post_call_transcript
3076
+ # Higher-quality transcript generated after the call via Soniox async STT. Null
3077
+ # until generated or when no recording is available.
3078
+ #
3079
+ # @return [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::PostCallTranscript>, nil]
3080
+ optional :post_call_transcript,
3081
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::PostCallTranscript] },
3082
+ nil?: true
3083
+
3084
+ # @!attribute sms_log
3085
+ # Automatic SMS sent after the call (voicemail and after-call), ordered oldest
3086
+ # first. The in-call `send_sms` is excluded — it already appears in the transcript
3087
+ # as a tool call.
3088
+ #
3089
+ # @return [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::SMSLog>, nil]
3090
+ optional :sms_log,
3091
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::SMSLog] },
3092
+ nil?: true
3093
+
3094
+ # @!attribute speech_events
3095
+ # Per-turn speech segments (VAD-derived) with timing and pipeline latencies,
3096
+ # ordered by started_speaking_at_ms. Empty for calls recorded before this was
3097
+ # tracked or for realtime sessions that don't emit them.
3098
+ #
3099
+ # @return [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::SpeechEvent>, nil]
3100
+ optional :speech_events,
3101
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::SpeechEvent] },
3102
+ nil?: true
3103
+
3104
+ # @!attribute structured_output
3105
+ # The data extracted from the call, using the structured output config from the
3106
+ # parent call object.
3107
+ #
3108
+ # @return [Hash{Symbol=>Object}, nil]
3109
+ optional :structured_output,
3110
+ Revox::Internal::Type::HashOf[Revox::Internal::Type::Unknown],
3111
+ nil?: true
3112
+
3113
+ # @!attribute transcript
3114
+ # The live transcript of the call, built in real time.
3115
+ #
3116
+ # @return [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::Transcript>, nil]
3117
+ optional :transcript,
3118
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::Transcript] },
3119
+ nil?: true
3120
+
3121
+ # @!method initialize(id:, answered_at:, dial_error:, ended_at:, handled_by_ai:, handled_by_human:, handled_by_user:, phone_number:, recording_url:, result:, started_at:, status:, assistants_used: nil, email_log: nil, end_reason: nil, ended_by: nil, post_call_transcript: nil, sms_log: nil, speech_events: nil, structured_output: nil, transcript: nil)
3122
+ # Some parameter documentations has been truncated, see
3123
+ # {Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt}
3124
+ # for more details.
3125
+ #
3126
+ # This represent a single call attempt. A call attempt is a single call made to
3127
+ # the phone number.
3128
+ #
3129
+ # @param id [String] The ID of the call attempt.
3130
+ #
3131
+ # @param answered_at [Object] The time the call was answered.
3132
+ #
3133
+ # @param dial_error [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::DialError, nil] The SIP error that occurred.
3134
+ #
3135
+ # @param ended_at [Object] The time the call ended.
3136
+ #
3137
+ # @param handled_by_ai [Boolean] Whether the AI agent conducted the conversation on this attempt. False for a sil
3138
+ #
3139
+ # @param handled_by_human [Boolean] Whether a human operator conducted (part of) this attempt — a jump-in takeover o
3140
+ #
3141
+ # @param handled_by_user [Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::HandledByUser, nil] The team member responsible for following up on this call.
3142
+ #
3143
+ # @param phone_number [String] The phone number that was called. Formatted in E.164 format. Example: +123456789
3144
+ #
3145
+ # @param recording_url [String, nil] The URL of the audio recording of the call.
3146
+ #
3147
+ # @param result [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::Result, nil]
3148
+ #
3149
+ # @param started_at [Object] The time the call started.
3150
+ #
3151
+ # @param status [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::Status] The status of the call attempt.
3152
+ #
3153
+ # @param assistants_used [Array<String>, nil] Assistant node ids entered during this attempt, in traversal order.
3154
+ #
3155
+ # @param email_log [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::EmailLog>, nil] Notification emails sent in connection with the call, ordered oldest first (from
3156
+ #
3157
+ # @param end_reason [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::EndReason, nil] Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call', 'voic
3158
+ #
3159
+ # @param ended_by [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::EndedBy, nil] Who ended the call: 'agent' (AI agent), 'user' (caller/callee hung up), or 'syst
3160
+ #
3161
+ # @param post_call_transcript [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::PostCallTranscript>, nil] Higher-quality transcript generated after the call via Soniox async STT. Null un
3162
+ #
3163
+ # @param sms_log [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::SMSLog>, nil] Automatic SMS sent after the call (voicemail and after-call), ordered oldest fir
3164
+ #
3165
+ # @param speech_events [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::SpeechEvent>, nil] Per-turn speech segments (VAD-derived) with timing and pipeline latencies, order
3166
+ #
3167
+ # @param structured_output [Hash{Symbol=>Object}, nil] The data extracted from the call, using the structured output config from the pa
3168
+ #
3169
+ # @param transcript [Array<Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::Transcript>, nil] The live transcript of the call, built in real time.
3170
+
3171
+ # The SIP error that occurred.
3172
+ #
3173
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt#dial_error
3174
+ module DialError
3175
+ extend Revox::Internal::Type::Enum
3176
+
3177
+ NUMBER_NON_ATTRIBUTED = :number_non_attributed
3178
+ TOO_MANY_CALLS = :too_many_calls
3179
+ BUSY = :busy
3180
+ TEMPORARILY_UNAVAILABLE = :temporarily_unavailable
3181
+ NO_ANSWER = :no_answer
3182
+ NO_INTERNATIONAL_PERMISSION = :no_international_permission
3183
+ PRECONDITION_FAILED = :precondition_failed
3184
+ NON_CLASSIFIED_ERROR = :non_classified_error
3185
+
3186
+ # @!method self.values
3187
+ # @return [Array<Symbol>]
3188
+ end
3189
+
3190
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt#handled_by_user
3191
+ class HandledByUser < Revox::Internal::Type::BaseModel
3192
+ # @!attribute id
3193
+ # The database user id of the assignee.
3194
+ #
3195
+ # @return [String]
3196
+ required :id, String
3197
+
3198
+ # @!attribute email
3199
+ #
3200
+ # @return [String]
3201
+ required :email, String
3202
+
3203
+ # @!attribute first_name
3204
+ #
3205
+ # @return [String, nil]
3206
+ required :first_name, String, nil?: true
3207
+
3208
+ # @!attribute last_name
3209
+ #
3210
+ # @return [String, nil]
3211
+ required :last_name, String, nil?: true
3212
+
3213
+ # @!method initialize(id:, email:, first_name:, last_name:)
3214
+ # The team member responsible for following up on this call.
3215
+ #
3216
+ # @param id [String] The database user id of the assignee.
3217
+ #
3218
+ # @param email [String]
3219
+ #
3220
+ # @param first_name [String, nil]
3221
+ #
3222
+ # @param last_name [String, nil]
3223
+ end
3224
+
3225
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt#result
3226
+ module Result
3227
+ extend Revox::Internal::Type::Enum
3228
+
3229
+ IVR = :IVR
3230
+ VOICEMAIL = :voicemail
3231
+ HUMAN = :human
3232
+ UNKNOWN = :unknown
3233
+ IOS_SCREENING_FILTER = :"ios-screening-filter"
3234
+
3235
+ # @!method self.values
3236
+ # @return [Array<Symbol>]
3237
+ end
3238
+
3239
+ # The status of the call attempt.
3240
+ #
3241
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt#status
3242
+ module Status
3243
+ extend Revox::Internal::Type::Enum
3244
+
3245
+ QUEUED = :queued
3246
+ RINGING = :ringing
3247
+ ONGOING = :ongoing
3248
+ COMPLETED = :completed
3249
+ ERROR = :error
3250
+
3251
+ # @!method self.values
3252
+ # @return [Array<Symbol>]
3253
+ end
3254
+
3255
+ class EmailLog < Revox::Internal::Type::BaseModel
3256
+ # @!attribute id
3257
+ #
3258
+ # @return [String]
3259
+ required :id, String
3260
+
3261
+ # @!attribute created_at
3262
+ # When the email was sent.
3263
+ #
3264
+ # @return [Object]
3265
+ required :created_at, Revox::Internal::Type::Unknown
3266
+
3267
+ # @!attribute from_address
3268
+ #
3269
+ # @return [String]
3270
+ required :from_address, String
3271
+
3272
+ # @!attribute resend_message_id
3273
+ #
3274
+ # @return [String, nil]
3275
+ required :resend_message_id, String, nil?: true
3276
+
3277
+ # @!attribute subject
3278
+ #
3279
+ # @return [String]
3280
+ required :subject, String
3281
+
3282
+ # @!attribute to_emails
3283
+ #
3284
+ # @return [Array<String>]
3285
+ required :to_emails, Revox::Internal::Type::ArrayOf[String]
3286
+
3287
+ # @!method initialize(id:, created_at:, from_address:, resend_message_id:, subject:, to_emails:)
3288
+ # @param id [String]
3289
+ #
3290
+ # @param created_at [Object] When the email was sent.
3291
+ #
3292
+ # @param from_address [String]
3293
+ #
3294
+ # @param resend_message_id [String, nil]
3295
+ #
3296
+ # @param subject [String]
3297
+ #
3298
+ # @param to_emails [Array<String>]
3299
+ end
3300
+
3301
+ # Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call',
3302
+ # 'voicemail', 'transfer', 'ivr_no_navigate'.
3303
+ #
3304
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt#end_reason
3305
+ module EndReason
3306
+ extend Revox::Internal::Type::Enum
3307
+
3308
+ CLIENT_INITIATED = :client_initiated
3309
+ CONNECTION_TIMEOUT = :connection_timeout
3310
+ HUMAN_TAKEOVER = :human_takeover
3311
+ IVR_NO_NAVIGATE = :ivr_no_navigate
3312
+ MAX_DURATION = :max_duration
3313
+ PARTICIPANT_REMOVED = :participant_removed
3314
+ TOOL_END_CALL = :tool_end_call
3315
+ TRANSFER = :transfer
3316
+ USER_INACTIVE = :user_inactive
3317
+ USER_REJECTED = :user_rejected
3318
+ USER_UNAVAILABLE = :user_unavailable
3319
+ VOICEMAIL = :voicemail
3320
+ SPEED_DIAL_ABANDONED = :speed_dial_abandoned
3321
+ SPEED_DIAL_OPERATOR_MISSED = :speed_dial_operator_missed
3322
+ SPEED_DIAL_TIMEOUT = :speed_dial_timeout
3323
+ SPEED_DIAL_HANGUP = :speed_dial_hangup
3324
+
3325
+ # @!method self.values
3326
+ # @return [Array<Symbol>]
3327
+ end
3328
+
3329
+ # Who ended the call: 'agent' (AI agent), 'user' (caller/callee hung up), or
3330
+ # 'system' (e.g. max duration limit).
3331
+ #
3332
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt#ended_by
3333
+ module EndedBy
3334
+ extend Revox::Internal::Type::Enum
3335
+
3336
+ AGENT = :agent
3337
+ USER = :user
3338
+ SYSTEM = :system
3339
+
3340
+ # @!method self.values
3341
+ # @return [Array<Symbol>]
3342
+ end
3343
+
3344
+ class PostCallTranscript < Revox::Internal::Type::BaseModel
3345
+ # @!attribute content
3346
+ #
3347
+ # @return [String]
3348
+ required :content, String
3349
+
3350
+ # @!attribute role
3351
+ #
3352
+ # @return [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::PostCallTranscript::Role]
3353
+ required :role,
3354
+ enum: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::PostCallTranscript::Role }
3355
+
3356
+ # @!attribute tool_arguments
3357
+ #
3358
+ # @return [Hash{Symbol=>Object}, String, nil]
3359
+ optional :tool_arguments,
3360
+ union: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::PostCallTranscript::ToolArguments }
3361
+
3362
+ # @!attribute tool_is_error
3363
+ #
3364
+ # @return [Boolean, nil]
3365
+ optional :tool_is_error, Revox::Internal::Type::Boolean
3366
+
3367
+ # @!attribute tool_name
3368
+ #
3369
+ # @return [String, nil]
3370
+ optional :tool_name, String
3371
+
3372
+ # @!attribute tool_output
3373
+ #
3374
+ # @return [String, nil]
3375
+ optional :tool_output, String
3376
+
3377
+ # @!method initialize(content:, role:, tool_arguments: nil, tool_is_error: nil, tool_name: nil, tool_output: nil)
3378
+ # @param content [String]
3379
+ # @param role [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::PostCallTranscript::Role]
3380
+ # @param tool_arguments [Hash{Symbol=>Object}, String]
3381
+ # @param tool_is_error [Boolean]
3382
+ # @param tool_name [String]
3383
+ # @param tool_output [String]
3384
+
3385
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::PostCallTranscript#role
3386
+ module Role
3387
+ extend Revox::Internal::Type::Enum
3388
+
3389
+ USER = :user
3390
+ ASSISTANT = :assistant
3391
+ HUMAN_AGENT = :human_agent
3392
+ TOOL = :tool
3393
+
3394
+ # @!method self.values
3395
+ # @return [Array<Symbol>]
3396
+ end
3397
+
3398
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::PostCallTranscript#tool_arguments
3399
+ module ToolArguments
3400
+ extend Revox::Internal::Type::Union
3401
+
3402
+ variant -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::PostCallTranscript::ToolArguments::UnionMember0Map }
3403
+
3404
+ variant String
3405
+
3406
+ # @!method self.variants
3407
+ # @return [Array(Hash{Symbol=>Object}, String)]
3408
+
3409
+ # @type [Revox::Internal::Type::Converter]
3410
+ UnionMember0Map = Revox::Internal::Type::HashOf[Revox::Internal::Type::Unknown]
3411
+ end
3412
+ end
3413
+
3414
+ class SMSLog < Revox::Internal::Type::BaseModel
3415
+ # @!attribute id
3416
+ #
3417
+ # @return [String]
3418
+ required :id, String
3419
+
3420
+ # @!attribute created_at
3421
+ # When the SMS was sent.
3422
+ #
3423
+ # @return [Object]
3424
+ required :created_at, Revox::Internal::Type::Unknown
3425
+
3426
+ # @!attribute message_body
3427
+ #
3428
+ # @return [String]
3429
+ required :message_body, String
3430
+
3431
+ # @!attribute provider
3432
+ #
3433
+ # @return [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::SMSLog::Provider]
3434
+ required :provider,
3435
+ enum: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::SMSLog::Provider }
3436
+
3437
+ # @!attribute provider_message_id
3438
+ #
3439
+ # @return [String, nil]
3440
+ required :provider_message_id, String, nil?: true
3441
+
3442
+ # @!attribute to_phone_number
3443
+ #
3444
+ # @return [String]
3445
+ required :to_phone_number, String
3446
+
3447
+ # @!attribute type
3448
+ #
3449
+ # @return [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::SMSLog::Type]
3450
+ required :type,
3451
+ enum: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::SMSLog::Type }
3452
+
3453
+ # @!method initialize(id:, created_at:, message_body:, provider:, provider_message_id:, to_phone_number:, type:)
3454
+ # @param id [String]
3455
+ #
3456
+ # @param created_at [Object] When the SMS was sent.
3457
+ #
3458
+ # @param message_body [String]
3459
+ #
3460
+ # @param provider [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::SMSLog::Provider]
3461
+ #
3462
+ # @param provider_message_id [String, nil]
3463
+ #
3464
+ # @param to_phone_number [String]
3465
+ #
3466
+ # @param type [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::SMSLog::Type]
3467
+
3468
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::SMSLog#provider
3469
+ module Provider
3470
+ extend Revox::Internal::Type::Enum
3471
+
3472
+ TWILIO = :twilio
3473
+ VONAGE = :vonage
3474
+
3475
+ # @!method self.values
3476
+ # @return [Array<Symbol>]
3477
+ end
3478
+
3479
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::SMSLog#type
3480
+ module Type
3481
+ extend Revox::Internal::Type::Enum
3482
+
3483
+ IN_CALL = :in_call
3484
+ VOICEMAIL = :voicemail
3485
+ AFTER_CALL = :after_call
3486
+
3487
+ # @!method self.values
3488
+ # @return [Array<Symbol>]
3489
+ end
3490
+ end
3491
+
3492
+ class SpeechEvent < Revox::Internal::Type::BaseModel
3493
+ # @!attribute id
3494
+ #
3495
+ # @return [String]
3496
+ required :id, String
3497
+
3498
+ # @!attribute is_real_turn
3499
+ # False when the segment was flagged as noise/blip rather than a meaningful turn.
3500
+ #
3501
+ # @return [Boolean]
3502
+ required :is_real_turn, Revox::Internal::Type::Boolean
3503
+
3504
+ # @!attribute llm_system_prompt
3505
+ # Agent-only: despite the name, the whole prompt the LLM was given for this turn —
3506
+ # system instructions plus conversation history — as JSON.
3507
+ #
3508
+ # @return [String, nil]
3509
+ required :llm_system_prompt, String, nil?: true
3510
+
3511
+ # @!attribute llm_ttft_ms
3512
+ # Agent-only: LLM time-to-first-token for the reply, in ms.
3513
+ #
3514
+ # @return [Float, nil]
3515
+ required :llm_ttft_ms, Float, nil?: true
3516
+
3517
+ # @!attribute llm_winner_model
3518
+ # Agent-only: the model that produced the reply — the winning leg when the LLM is
3519
+ # a race, which is also the model `llm_ttft_ms` describes.
3520
+ #
3521
+ # @return [String, nil]
3522
+ required :llm_winner_model, String, nil?: true
3523
+
3524
+ # @!attribute speaker
3525
+ # Who was speaking during this segment.
3526
+ #
3527
+ # @return [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::SpeechEvent::Speaker]
3528
+ required :speaker,
3529
+ enum: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::SpeechEvent::Speaker }
3530
+
3531
+ # @!attribute started_speaking_at_ms
3532
+ # Milliseconds since session start when speech began.
3533
+ #
3534
+ # @return [Float]
3535
+ required :started_speaking_at_ms, Float
3536
+
3537
+ # @!attribute stopped_speaking_at_ms
3538
+ # Milliseconds since session start when speech ended. Null when the session ended
3539
+ # before the turn closed.
3540
+ #
3541
+ # @return [Float, nil]
3542
+ required :stopped_speaking_at_ms, Float, nil?: true
3543
+
3544
+ # @!attribute stt_transcription_delay_ms
3545
+ # User-only: time from end-of-speech to final transcript, in ms.
3546
+ #
3547
+ # @return [Float, nil]
3548
+ required :stt_transcription_delay_ms, Float, nil?: true
3549
+
3550
+ # @!attribute transcript
3551
+ # Recognized text for this segment, when available.
3552
+ #
3553
+ # @return [String, nil]
3554
+ required :transcript, String, nil?: true
3555
+
3556
+ # @!attribute tts_ttfb_ms
3557
+ # Agent-only: TTS time-to-first-audio-byte for the reply, in ms.
3558
+ #
3559
+ # @return [Float, nil]
3560
+ required :tts_ttfb_ms, Float, nil?: true
3561
+
3562
+ # @!attribute was_cut
3563
+ # Agent-only: true when the agent's audio was interrupted (real or auto-resumed).
3564
+ # Null on user segments.
3565
+ #
3566
+ # @return [Boolean, nil]
3567
+ required :was_cut, Revox::Internal::Type::Boolean, nil?: true
3568
+
3569
+ # @!method initialize(id:, is_real_turn:, llm_system_prompt:, llm_ttft_ms:, llm_winner_model:, speaker:, started_speaking_at_ms:, stopped_speaking_at_ms:, stt_transcription_delay_ms:, transcript:, tts_ttfb_ms:, was_cut:)
3570
+ # Some parameter documentations has been truncated, see
3571
+ # {Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::SpeechEvent}
3572
+ # for more details.
3573
+ #
3574
+ # @param id [String]
3575
+ #
3576
+ # @param is_real_turn [Boolean] False when the segment was flagged as noise/blip rather than a meaningful turn.
3577
+ #
3578
+ # @param llm_system_prompt [String, nil] Agent-only: despite the name, the whole prompt the LLM was given for this turn —
3579
+ #
3580
+ # @param llm_ttft_ms [Float, nil] Agent-only: LLM time-to-first-token for the reply, in ms.
3581
+ #
3582
+ # @param llm_winner_model [String, nil] Agent-only: the model that produced the reply — the winning leg when the LLM is
3583
+ #
3584
+ # @param speaker [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::SpeechEvent::Speaker] Who was speaking during this segment.
3585
+ #
3586
+ # @param started_speaking_at_ms [Float] Milliseconds since session start when speech began.
3587
+ #
3588
+ # @param stopped_speaking_at_ms [Float, nil] Milliseconds since session start when speech ended. Null when the session ended
3589
+ #
3590
+ # @param stt_transcription_delay_ms [Float, nil] User-only: time from end-of-speech to final transcript, in ms.
3591
+ #
3592
+ # @param transcript [String, nil] Recognized text for this segment, when available.
3593
+ #
3594
+ # @param tts_ttfb_ms [Float, nil] Agent-only: TTS time-to-first-audio-byte for the reply, in ms.
3595
+ #
3596
+ # @param was_cut [Boolean, nil] Agent-only: true when the agent's audio was interrupted (real or auto-resumed).
3597
+
3598
+ # Who was speaking during this segment.
3599
+ #
3600
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::SpeechEvent#speaker
3601
+ module Speaker
3602
+ extend Revox::Internal::Type::Enum
3603
+
3604
+ USER = :user
3605
+ AGENT = :agent
3606
+
3607
+ # @!method self.values
3608
+ # @return [Array<Symbol>]
3609
+ end
3610
+ end
3611
+
3612
+ class Transcript < Revox::Internal::Type::BaseModel
3613
+ # @!attribute content
3614
+ #
3615
+ # @return [String]
3616
+ required :content, String
3617
+
3618
+ # @!attribute role
3619
+ #
3620
+ # @return [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::Transcript::Role]
3621
+ required :role,
3622
+ enum: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::Transcript::Role }
3623
+
3624
+ # @!attribute tool_arguments
3625
+ #
3626
+ # @return [Hash{Symbol=>Object}, String, nil]
3627
+ optional :tool_arguments,
3628
+ union: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::Transcript::ToolArguments }
3629
+
3630
+ # @!attribute tool_is_error
3631
+ #
3632
+ # @return [Boolean, nil]
3633
+ optional :tool_is_error, Revox::Internal::Type::Boolean
3634
+
3635
+ # @!attribute tool_name
3636
+ #
3637
+ # @return [String, nil]
3638
+ optional :tool_name, String
3639
+
3640
+ # @!attribute tool_output
3641
+ #
3642
+ # @return [String, nil]
3643
+ optional :tool_output, String
3644
+
3645
+ # @!method initialize(content:, role:, tool_arguments: nil, tool_is_error: nil, tool_name: nil, tool_output: nil)
3646
+ # @param content [String]
3647
+ # @param role [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::Transcript::Role]
3648
+ # @param tool_arguments [Hash{Symbol=>Object}, String]
3649
+ # @param tool_is_error [Boolean]
3650
+ # @param tool_name [String]
3651
+ # @param tool_output [String]
3652
+
3653
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::Transcript#role
3654
+ module Role
3655
+ extend Revox::Internal::Type::Enum
3656
+
3657
+ USER = :user
3658
+ ASSISTANT = :assistant
3659
+ HUMAN_AGENT = :human_agent
3660
+ TOOL = :tool
3661
+
3662
+ # @!method self.values
3663
+ # @return [Array<Symbol>]
3664
+ end
3665
+
3666
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::Transcript#tool_arguments
3667
+ module ToolArguments
3668
+ extend Revox::Internal::Type::Union
3669
+
3670
+ variant -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LastCallAttempt::Transcript::ToolArguments::UnionMember0Map }
3671
+
3672
+ variant String
3673
+
3674
+ # @!method self.variants
3675
+ # @return [Array(Hash{Symbol=>Object}, String)]
3676
+
3677
+ # @type [Revox::Internal::Type::Converter]
3678
+ UnionMember0Map = Revox::Internal::Type::HashOf[Revox::Internal::Type::Unknown]
3679
+ end
3680
+ end
3681
+ end
3682
+
3683
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall#llm_model
3684
+ module LlmModel
3685
+ extend Revox::Internal::Type::Union
3686
+
3687
+ variant -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LlmModel::UnionMember0 }
3688
+
3689
+ variant -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LlmModel::UnionMember1 }
3690
+
3691
+ variant -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LlmModel::UnionMember2 }
3692
+
3693
+ variant -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LlmModel::UnionMember3 }
3694
+
3695
+ class UnionMember0 < Revox::Internal::Type::BaseModel
3696
+ # @!attribute name
3697
+ #
3698
+ # @return [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LlmModel::UnionMember0::Name]
3699
+ required :name,
3700
+ enum: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LlmModel::UnionMember0::Name }
3701
+
3702
+ # @!attribute type
3703
+ #
3704
+ # @return [Symbol, :"dedicated-instance"]
3705
+ required :type, const: :"dedicated-instance"
3706
+
3707
+ # @!method initialize(name:, type: :"dedicated-instance")
3708
+ # @param name [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LlmModel::UnionMember0::Name]
3709
+ # @param type [Symbol, :"dedicated-instance"]
3710
+
3711
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LlmModel::UnionMember0#name
3712
+ module Name
3713
+ extend Revox::Internal::Type::Enum
3714
+
3715
+ GPT_4_1 = :"gpt-4.1"
3716
+ MINISTRAL_3_8B_INSTRUCT = :"ministral-3-8b-instruct"
3717
+
3718
+ # @!method self.values
3719
+ # @return [Array<Symbol>]
3720
+ end
3721
+ end
3722
+
3723
+ class UnionMember1 < Revox::Internal::Type::BaseModel
3724
+ # @!attribute openrouter_model_id
3725
+ # The model ID to use from OpenRouter. eg: openai/gpt-4.1
3726
+ #
3727
+ # @return [String]
3728
+ required :openrouter_model_id, String
3729
+
3730
+ # @!attribute openrouter_provider
3731
+ # The provider to use from OpenRouter. eg: nebius, openai, azure, etc.
3732
+ #
3733
+ # @return [String]
3734
+ required :openrouter_provider, String
3735
+
3736
+ # @!attribute type
3737
+ # Use a model from OpenRouter.
3738
+ #
3739
+ # @return [Symbol, :openrouter]
3740
+ required :type, const: :openrouter
3741
+
3742
+ # @!method initialize(openrouter_model_id:, openrouter_provider:, type: :openrouter)
3743
+ # @param openrouter_model_id [String] The model ID to use from OpenRouter. eg: openai/gpt-4.1
3744
+ #
3745
+ # @param openrouter_provider [String] The provider to use from OpenRouter. eg: nebius, openai, azure, etc.
3746
+ #
3747
+ # @param type [Symbol, :openrouter] Use a model from OpenRouter.
3748
+ end
3749
+
3750
+ class UnionMember2 < Revox::Internal::Type::BaseModel
3751
+ # @!attribute api_key
3752
+ # API key sent as Bearer token to the custom endpoint.
3753
+ #
3754
+ # @return [String]
3755
+ required :api_key, String
3756
+
3757
+ # @!attribute api_url
3758
+ # Base URL for the OpenAI-compatible API, e.g. https://api.together.xyz/v1
3759
+ #
3760
+ # @return [String]
3761
+ required :api_url, String
3762
+
3763
+ # @!attribute model_name
3764
+ # Model name as expected by the provider, e.g. meta-llama/llama-3-70b
3765
+ #
3766
+ # @return [String]
3767
+ required :model_name, String
3768
+
3769
+ # @!attribute type
3770
+ # OpenAI-compatible chat completions API (bring your own endpoint and key).
3771
+ #
3772
+ # @return [Symbol, :custom]
3773
+ required :type, const: :custom
3774
+
3775
+ # @!method initialize(api_key:, api_url:, model_name:, type: :custom)
3776
+ # @param api_key [String] API key sent as Bearer token to the custom endpoint.
3777
+ #
3778
+ # @param api_url [String] Base URL for the OpenAI-compatible API, e.g. https://api.together.xyz/v1
3779
+ #
3780
+ # @param model_name [String] Model name as expected by the provider, e.g. meta-llama/llama-3-70b
3781
+ #
3782
+ # @param type [Symbol, :custom] OpenAI-compatible chat completions API (bring your own endpoint and key).
3783
+ end
3784
+
3785
+ class UnionMember3 < Revox::Internal::Type::BaseModel
3786
+ # @!attribute provider
3787
+ # The provider to use from Realtime. eg: openai, google.
3788
+ #
3789
+ # @return [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LlmModel::UnionMember3::Provider]
3790
+ required :provider,
3791
+ enum: -> { Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LlmModel::UnionMember3::Provider }
3792
+
3793
+ # @!attribute realtime_model_id
3794
+ # The model ID to use from Realtime. eg: gpt-4.1
3795
+ #
3796
+ # @return [String]
3797
+ required :realtime_model_id, String
3798
+
3799
+ # @!attribute type
3800
+ # Use a model from Realtime.
3801
+ #
3802
+ # @return [Symbol, :realtime]
3803
+ required :type, const: :realtime
3804
+
3805
+ # @!attribute realtime_voice_id
3806
+ # Output voice for the realtime provider (e.g. OpenAI: marin; Gemini: Puck).
3807
+ #
3808
+ # @return [String, nil]
3809
+ optional :realtime_voice_id, String
3810
+
3811
+ # @!method initialize(provider:, realtime_model_id:, realtime_voice_id: nil, type: :realtime)
3812
+ # @param provider [Symbol, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LlmModel::UnionMember3::Provider] The provider to use from Realtime. eg: openai, google.
3813
+ #
3814
+ # @param realtime_model_id [String] The model ID to use from Realtime. eg: gpt-4.1
3815
+ #
3816
+ # @param realtime_voice_id [String] Output voice for the realtime provider (e.g. OpenAI: marin; Gemini: Puck).
3817
+ #
3818
+ # @param type [Symbol, :realtime] Use a model from Realtime.
3819
+
3820
+ # The provider to use from Realtime. eg: openai, google.
3821
+ #
3822
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LlmModel::UnionMember3#provider
3823
+ module Provider
3824
+ extend Revox::Internal::Type::Enum
3825
+
3826
+ OPENAI = :openai
3827
+ GOOGLE = :google
3828
+
3829
+ # @!method self.values
3830
+ # @return [Array<Symbol>]
3831
+ end
3832
+ end
3833
+
3834
+ # @!method self.variants
3835
+ # @return [Array(Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LlmModel::UnionMember0, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LlmModel::UnionMember1, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LlmModel::UnionMember2, Revox::Models::CampaignLaunchResponse::Session::InFlightCall::LlmModel::UnionMember3)]
3836
+ end
3837
+
3838
+ # The status of the call.
3839
+ #
3840
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall#status
3841
+ module Status
3842
+ extend Revox::Internal::Type::Enum
3843
+
3844
+ INITIALIZING = :initializing
3845
+ QUEUED_FOR_CALLING = :queued_for_calling
3846
+ CALLING = :calling
3847
+ POST_PROCESSING = :post_processing
3848
+ NOT_LAUNCHED = :not_launched
3849
+ SCHEDULED = :scheduled
3850
+ PAUSED = :paused
3851
+ COMPLETED = :completed
3852
+ CANCELLED = :cancelled
3853
+ ERRORED = :errored
3854
+
3855
+ # @!method self.values
3856
+ # @return [Array<Symbol>]
3857
+ end
3858
+
3859
+ # Business outcome of the call. Null if not computed or no transcript.
3860
+ #
3861
+ # @see Revox::Models::CampaignLaunchResponse::Session::InFlightCall#outcome
3862
+ module Outcome
3863
+ extend Revox::Internal::Type::Enum
3864
+
3865
+ NOT_INTERESTED = :not_interested
3866
+ INTERESTED = :interested
3867
+ COMPLETED = :completed
3868
+ REQUESTED_CALLBACK_LATER = :requested_callback_later
3869
+
3870
+ # @!method self.values
3871
+ # @return [Array<Symbol>]
3872
+ end
3873
+ end
3874
+
3875
+ module OutcomeFilter
3876
+ extend Revox::Internal::Type::Enum
3877
+
3878
+ NOT_INTERESTED = :not_interested
3879
+ INTERESTED = :interested
3880
+ COMPLETED = :completed
3881
+ REQUESTED_CALLBACK_LATER = :requested_callback_later
3882
+
3883
+ # @!method self.values
3884
+ # @return [Array<Symbol>]
3885
+ end
3886
+
3887
+ # @see Revox::Models::CampaignLaunchResponse::Session#status
3888
+ module Status
3889
+ extend Revox::Internal::Type::Enum
3890
+
3891
+ DIALING = :dialing
3892
+ CONNECTED = :connected
3893
+ COMPLETED = :completed
3894
+ STOPPED = :stopped
3895
+ ERRORED = :errored
3896
+
3897
+ # @!method self.values
3898
+ # @return [Array<Symbol>]
3899
+ end
3900
+ end
3901
+ end
3902
+ end
3903
+ end