revox 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. checksums.yaml +7 -0
  2. data/.ignore +2 -0
  3. data/CHANGELOG.md +10 -0
  4. data/README.md +234 -0
  5. data/SECURITY.md +23 -0
  6. data/lib/revox/client.rb +86 -0
  7. data/lib/revox/errors.rb +228 -0
  8. data/lib/revox/file_part.rb +58 -0
  9. data/lib/revox/internal/transport/base_client.rb +570 -0
  10. data/lib/revox/internal/transport/pooled_net_requester.rb +210 -0
  11. data/lib/revox/internal/type/array_of.rb +168 -0
  12. data/lib/revox/internal/type/base_model.rb +529 -0
  13. data/lib/revox/internal/type/base_page.rb +55 -0
  14. data/lib/revox/internal/type/boolean.rb +77 -0
  15. data/lib/revox/internal/type/converter.rb +327 -0
  16. data/lib/revox/internal/type/enum.rb +131 -0
  17. data/lib/revox/internal/type/file_input.rb +110 -0
  18. data/lib/revox/internal/type/hash_of.rb +188 -0
  19. data/lib/revox/internal/type/request_parameters.rb +42 -0
  20. data/lib/revox/internal/type/union.rb +237 -0
  21. data/lib/revox/internal/type/unknown.rb +81 -0
  22. data/lib/revox/internal/util.rb +920 -0
  23. data/lib/revox/internal.rb +20 -0
  24. data/lib/revox/models/assistant_create_params.rb +467 -0
  25. data/lib/revox/models/assistant_create_response.rb +535 -0
  26. data/lib/revox/models/assistant_delete_params.rb +14 -0
  27. data/lib/revox/models/assistant_delete_response.rb +16 -0
  28. data/lib/revox/models/assistant_list_params.rb +14 -0
  29. data/lib/revox/models/assistant_list_response.rb +533 -0
  30. data/lib/revox/models/assistant_retrieve_params.rb +14 -0
  31. data/lib/revox/models/assistant_retrieve_response.rb +518 -0
  32. data/lib/revox/models/assistant_update_params.rb +467 -0
  33. data/lib/revox/models/assistant_update_response.rb +535 -0
  34. data/lib/revox/models/call_create_params.rb +592 -0
  35. data/lib/revox/models/call_create_response.rb +684 -0
  36. data/lib/revox/models/call_list_params.rb +29 -0
  37. data/lib/revox/models/call_list_response.rb +197 -0
  38. data/lib/revox/models/call_retrieve_params.rb +14 -0
  39. data/lib/revox/models/call_retrieve_response.rb +684 -0
  40. data/lib/revox/models/users/me_retrieve_params.rb +16 -0
  41. data/lib/revox/models/users/me_retrieve_response.rb +89 -0
  42. data/lib/revox/models/users/me_update_params.rb +22 -0
  43. data/lib/revox/models/users/me_update_response.rb +89 -0
  44. data/lib/revox/models/voice_list_params.rb +14 -0
  45. data/lib/revox/models/voice_list_response.rb +91 -0
  46. data/lib/revox/models/voice_preview_params.rb +49 -0
  47. data/lib/revox/models/voice_retrieve_params.rb +30 -0
  48. data/lib/revox/models/voice_retrieve_response.rb +39 -0
  49. data/lib/revox/models.rb +65 -0
  50. data/lib/revox/request_options.rb +77 -0
  51. data/lib/revox/resources/assistants.rb +180 -0
  52. data/lib/revox/resources/call.rb +100 -0
  53. data/lib/revox/resources/users/me.rb +55 -0
  54. data/lib/revox/resources/users.rb +18 -0
  55. data/lib/revox/resources/voices.rb +83 -0
  56. data/lib/revox/version.rb +5 -0
  57. data/lib/revox.rb +85 -0
  58. data/manifest.yaml +17 -0
  59. data/rbi/revox/client.rbi +58 -0
  60. data/rbi/revox/errors.rbi +205 -0
  61. data/rbi/revox/file_part.rbi +37 -0
  62. data/rbi/revox/internal/transport/base_client.rbi +297 -0
  63. data/rbi/revox/internal/transport/pooled_net_requester.rbi +82 -0
  64. data/rbi/revox/internal/type/array_of.rbi +104 -0
  65. data/rbi/revox/internal/type/base_model.rbi +299 -0
  66. data/rbi/revox/internal/type/base_page.rbi +42 -0
  67. data/rbi/revox/internal/type/boolean.rbi +58 -0
  68. data/rbi/revox/internal/type/converter.rbi +204 -0
  69. data/rbi/revox/internal/type/enum.rbi +82 -0
  70. data/rbi/revox/internal/type/file_input.rbi +58 -0
  71. data/rbi/revox/internal/type/hash_of.rbi +104 -0
  72. data/rbi/revox/internal/type/request_parameters.rbi +29 -0
  73. data/rbi/revox/internal/type/union.rbi +126 -0
  74. data/rbi/revox/internal/type/unknown.rbi +58 -0
  75. data/rbi/revox/internal/util.rbi +478 -0
  76. data/rbi/revox/internal.rbi +16 -0
  77. data/rbi/revox/models/assistant_create_params.rbi +929 -0
  78. data/rbi/revox/models/assistant_create_response.rbi +1089 -0
  79. data/rbi/revox/models/assistant_delete_params.rbi +27 -0
  80. data/rbi/revox/models/assistant_delete_response.rbi +26 -0
  81. data/rbi/revox/models/assistant_list_params.rbi +27 -0
  82. data/rbi/revox/models/assistant_list_response.rbi +1079 -0
  83. data/rbi/revox/models/assistant_retrieve_params.rbi +27 -0
  84. data/rbi/revox/models/assistant_retrieve_response.rbi +1024 -0
  85. data/rbi/revox/models/assistant_update_params.rbi +935 -0
  86. data/rbi/revox/models/assistant_update_response.rbi +1089 -0
  87. data/rbi/revox/models/call_create_params.rbi +1147 -0
  88. data/rbi/revox/models/call_create_response.rbi +1335 -0
  89. data/rbi/revox/models/call_list_params.rbi +47 -0
  90. data/rbi/revox/models/call_list_response.rbi +401 -0
  91. data/rbi/revox/models/call_retrieve_params.rbi +27 -0
  92. data/rbi/revox/models/call_retrieve_response.rbi +1346 -0
  93. data/rbi/revox/models/users/me_retrieve_params.rbi +29 -0
  94. data/rbi/revox/models/users/me_retrieve_response.rbi +139 -0
  95. data/rbi/revox/models/users/me_update_params.rbi +43 -0
  96. data/rbi/revox/models/users/me_update_response.rbi +139 -0
  97. data/rbi/revox/models/voice_list_params.rbi +25 -0
  98. data/rbi/revox/models/voice_list_response.rbi +204 -0
  99. data/rbi/revox/models/voice_preview_params.rbi +84 -0
  100. data/rbi/revox/models/voice_retrieve_params.rbi +59 -0
  101. data/rbi/revox/models/voice_retrieve_response.rbi +70 -0
  102. data/rbi/revox/models.rbi +27 -0
  103. data/rbi/revox/request_options.rbi +55 -0
  104. data/rbi/revox/resources/assistants.rbi +206 -0
  105. data/rbi/revox/resources/call.rbi +86 -0
  106. data/rbi/revox/resources/users/me.rbi +33 -0
  107. data/rbi/revox/resources/users.rbi +15 -0
  108. data/rbi/revox/resources/voices.rbi +58 -0
  109. data/rbi/revox/version.rbi +5 -0
  110. data/sig/revox/client.rbs +32 -0
  111. data/sig/revox/errors.rbs +117 -0
  112. data/sig/revox/file_part.rbs +21 -0
  113. data/sig/revox/internal/transport/base_client.rbs +133 -0
  114. data/sig/revox/internal/transport/pooled_net_requester.rbs +48 -0
  115. data/sig/revox/internal/type/array_of.rbs +48 -0
  116. data/sig/revox/internal/type/base_model.rbs +102 -0
  117. data/sig/revox/internal/type/base_page.rbs +24 -0
  118. data/sig/revox/internal/type/boolean.rbs +26 -0
  119. data/sig/revox/internal/type/converter.rbs +79 -0
  120. data/sig/revox/internal/type/enum.rbs +32 -0
  121. data/sig/revox/internal/type/file_input.rbs +25 -0
  122. data/sig/revox/internal/type/hash_of.rbs +48 -0
  123. data/sig/revox/internal/type/request_parameters.rbs +17 -0
  124. data/sig/revox/internal/type/union.rbs +52 -0
  125. data/sig/revox/internal/type/unknown.rbs +26 -0
  126. data/sig/revox/internal/util.rbs +185 -0
  127. data/sig/revox/internal.rbs +9 -0
  128. data/sig/revox/models/assistant_create_params.rbs +413 -0
  129. data/sig/revox/models/assistant_create_response.rbs +461 -0
  130. data/sig/revox/models/assistant_delete_params.rbs +15 -0
  131. data/sig/revox/models/assistant_delete_response.rbs +13 -0
  132. data/sig/revox/models/assistant_list_params.rbs +15 -0
  133. data/sig/revox/models/assistant_list_response.rbs +461 -0
  134. data/sig/revox/models/assistant_retrieve_params.rbs +15 -0
  135. data/sig/revox/models/assistant_retrieve_response.rbs +446 -0
  136. data/sig/revox/models/assistant_update_params.rbs +417 -0
  137. data/sig/revox/models/assistant_update_response.rbs +461 -0
  138. data/sig/revox/models/call_create_params.rbs +507 -0
  139. data/sig/revox/models/call_create_response.rbs +551 -0
  140. data/sig/revox/models/call_list_params.rbs +28 -0
  141. data/sig/revox/models/call_list_response.rbs +171 -0
  142. data/sig/revox/models/call_retrieve_params.rbs +14 -0
  143. data/sig/revox/models/call_retrieve_response.rbs +551 -0
  144. data/sig/revox/models/users/me_retrieve_params.rbs +16 -0
  145. data/sig/revox/models/users/me_retrieve_response.rbs +70 -0
  146. data/sig/revox/models/users/me_update_params.rbs +28 -0
  147. data/sig/revox/models/users/me_update_response.rbs +70 -0
  148. data/sig/revox/models/voice_list_params.rbs +14 -0
  149. data/sig/revox/models/voice_list_response.rbs +83 -0
  150. data/sig/revox/models/voice_preview_params.rbs +49 -0
  151. data/sig/revox/models/voice_retrieve_params.rbs +35 -0
  152. data/sig/revox/models/voice_retrieve_response.rbs +32 -0
  153. data/sig/revox/models.rbs +25 -0
  154. data/sig/revox/request_options.rbs +34 -0
  155. data/sig/revox/resources/assistants.rbs +66 -0
  156. data/sig/revox/resources/call.rbs +31 -0
  157. data/sig/revox/resources/users/me.rbs +18 -0
  158. data/sig/revox/resources/users.rbs +9 -0
  159. data/sig/revox/resources/voices.rbs +24 -0
  160. data/sig/revox/version.rbs +3 -0
  161. metadata +232 -0
@@ -0,0 +1,1335 @@
1
+ # typed: strong
2
+
3
+ module Revox
4
+ module Models
5
+ class CallCreateResponse < Revox::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Revox::Models::CallCreateResponse, Revox::Internal::AnyHash)
9
+ end
10
+
11
+ # This represent a call "order" that was requested by the user. A call order can
12
+ # be resolved over multiple call attempts spanning up to a few days.
13
+ sig { returns(Revox::Models::CallCreateResponse::Call) }
14
+ attr_reader :call
15
+
16
+ sig { params(call: Revox::Models::CallCreateResponse::Call::OrHash).void }
17
+ attr_writer :call
18
+
19
+ sig do
20
+ params(call: Revox::Models::CallCreateResponse::Call::OrHash).returns(
21
+ T.attached_class
22
+ )
23
+ end
24
+ def self.new(
25
+ # This represent a call "order" that was requested by the user. A call order can
26
+ # be resolved over multiple call attempts spanning up to a few days.
27
+ call:
28
+ )
29
+ end
30
+
31
+ sig do
32
+ override.returns({ call: Revox::Models::CallCreateResponse::Call })
33
+ end
34
+ def to_hash
35
+ end
36
+
37
+ class Call < Revox::Internal::Type::BaseModel
38
+ OrHash =
39
+ T.type_alias do
40
+ T.any(
41
+ Revox::Models::CallCreateResponse::Call,
42
+ Revox::Internal::AnyHash
43
+ )
44
+ end
45
+
46
+ # The ID of the call.
47
+ sig { returns(String) }
48
+ attr_accessor :id
49
+
50
+ # All call attempts for this call order, ordered by most recent first.
51
+ sig do
52
+ returns(
53
+ T::Array[Revox::Models::CallCreateResponse::Call::CallAttempt]
54
+ )
55
+ end
56
+ attr_accessor :call_attempts
57
+
58
+ # Configuration for call retry behavior including time windows, delays, and max
59
+ # iterations. If not provided, defaults will be used.
60
+ sig do
61
+ returns(
62
+ T.nilable(Revox::Models::CallCreateResponse::Call::CallRetryConfig)
63
+ )
64
+ end
65
+ attr_reader :call_retry_config
66
+
67
+ sig do
68
+ params(
69
+ call_retry_config:
70
+ T.nilable(
71
+ Revox::Models::CallCreateResponse::Call::CallRetryConfig::OrHash
72
+ )
73
+ ).void
74
+ end
75
+ attr_writer :call_retry_config
76
+
77
+ # The number of call attempts made.
78
+ sig { returns(Float) }
79
+ attr_accessor :calls_count
80
+
81
+ # The time the call order was created.
82
+ sig { returns(T.anything) }
83
+ attr_accessor :created_at
84
+
85
+ # Whether the call is inbound or outbound.
86
+ sig do
87
+ returns(
88
+ Revox::Models::CallCreateResponse::Call::Direction::TaggedSymbol
89
+ )
90
+ end
91
+ attr_accessor :direction
92
+
93
+ # Delay in milliseconds before speaking the first sentence. Default: 400.
94
+ sig { returns(Integer) }
95
+ attr_accessor :first_sentence_delay_ms
96
+
97
+ # The phone number that made the call. Formatted in E.164 format. Example:
98
+ # +1234567890
99
+ sig { returns(String) }
100
+ attr_accessor :from_phone_number
101
+
102
+ # Whether the call was cancelled.
103
+ sig { returns(T::Boolean) }
104
+ attr_accessor :is_cancelled
105
+
106
+ # Whether the call is completed or still in progress.
107
+ sig { returns(T::Boolean) }
108
+ attr_accessor :is_completed
109
+
110
+ # This represent a single call attempt. A call attempt is a single call made to
111
+ # the phone number.
112
+ sig do
113
+ returns(
114
+ T.nilable(Revox::Models::CallCreateResponse::Call::LastCallAttempt)
115
+ )
116
+ end
117
+ attr_reader :last_call_attempt
118
+
119
+ sig do
120
+ params(
121
+ last_call_attempt:
122
+ T.nilable(
123
+ Revox::Models::CallCreateResponse::Call::LastCallAttempt::OrHash
124
+ )
125
+ ).void
126
+ end
127
+ attr_writer :last_call_attempt
128
+
129
+ sig do
130
+ returns(Revox::Models::CallCreateResponse::Call::LlmModel::Variants)
131
+ end
132
+ attr_accessor :llm_model
133
+
134
+ # Metadata stored with the call.
135
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
136
+ attr_accessor :metadata
137
+
138
+ # The next call attempt time.
139
+ sig { returns(T.anything) }
140
+ attr_accessor :next_call_at
141
+
142
+ # The time the call order is scheduled to start.
143
+ sig { returns(T.anything) }
144
+ attr_accessor :scheduled_at
145
+
146
+ # The phone number that received the call. Formatted in E.164 format. Example:
147
+ # +1234567890
148
+ sig { returns(String) }
149
+ attr_accessor :to_phone_number
150
+
151
+ # This represent a call "order" that was requested by the user. A call order can
152
+ # be resolved over multiple call attempts spanning up to a few days.
153
+ sig do
154
+ params(
155
+ id: String,
156
+ call_attempts:
157
+ T::Array[
158
+ Revox::Models::CallCreateResponse::Call::CallAttempt::OrHash
159
+ ],
160
+ call_retry_config:
161
+ T.nilable(
162
+ Revox::Models::CallCreateResponse::Call::CallRetryConfig::OrHash
163
+ ),
164
+ calls_count: Float,
165
+ created_at: T.anything,
166
+ direction:
167
+ Revox::Models::CallCreateResponse::Call::Direction::OrSymbol,
168
+ first_sentence_delay_ms: Integer,
169
+ from_phone_number: String,
170
+ is_cancelled: T::Boolean,
171
+ is_completed: T::Boolean,
172
+ last_call_attempt:
173
+ T.nilable(
174
+ Revox::Models::CallCreateResponse::Call::LastCallAttempt::OrHash
175
+ ),
176
+ llm_model:
177
+ T.any(
178
+ Revox::Models::CallCreateResponse::Call::LlmModel::UnionMember0::OrHash,
179
+ Revox::Models::CallCreateResponse::Call::LlmModel::UnionMember1::OrHash
180
+ ),
181
+ metadata: T.nilable(T::Hash[Symbol, String]),
182
+ next_call_at: T.anything,
183
+ scheduled_at: T.anything,
184
+ to_phone_number: String
185
+ ).returns(T.attached_class)
186
+ end
187
+ def self.new(
188
+ # The ID of the call.
189
+ id:,
190
+ # All call attempts for this call order, ordered by most recent first.
191
+ call_attempts:,
192
+ # Configuration for call retry behavior including time windows, delays, and max
193
+ # iterations. If not provided, defaults will be used.
194
+ call_retry_config:,
195
+ # The number of call attempts made.
196
+ calls_count:,
197
+ # The time the call order was created.
198
+ created_at:,
199
+ # Whether the call is inbound or outbound.
200
+ direction:,
201
+ # Delay in milliseconds before speaking the first sentence. Default: 400.
202
+ first_sentence_delay_ms:,
203
+ # The phone number that made the call. Formatted in E.164 format. Example:
204
+ # +1234567890
205
+ from_phone_number:,
206
+ # Whether the call was cancelled.
207
+ is_cancelled:,
208
+ # Whether the call is completed or still in progress.
209
+ is_completed:,
210
+ # This represent a single call attempt. A call attempt is a single call made to
211
+ # the phone number.
212
+ last_call_attempt:,
213
+ llm_model:,
214
+ # Metadata stored with the call.
215
+ metadata:,
216
+ # The next call attempt time.
217
+ next_call_at:,
218
+ # The time the call order is scheduled to start.
219
+ scheduled_at:,
220
+ # The phone number that received the call. Formatted in E.164 format. Example:
221
+ # +1234567890
222
+ to_phone_number:
223
+ )
224
+ end
225
+
226
+ sig do
227
+ override.returns(
228
+ {
229
+ id: String,
230
+ call_attempts:
231
+ T::Array[Revox::Models::CallCreateResponse::Call::CallAttempt],
232
+ call_retry_config:
233
+ T.nilable(
234
+ Revox::Models::CallCreateResponse::Call::CallRetryConfig
235
+ ),
236
+ calls_count: Float,
237
+ created_at: T.anything,
238
+ direction:
239
+ Revox::Models::CallCreateResponse::Call::Direction::TaggedSymbol,
240
+ first_sentence_delay_ms: Integer,
241
+ from_phone_number: String,
242
+ is_cancelled: T::Boolean,
243
+ is_completed: T::Boolean,
244
+ last_call_attempt:
245
+ T.nilable(
246
+ Revox::Models::CallCreateResponse::Call::LastCallAttempt
247
+ ),
248
+ llm_model:
249
+ Revox::Models::CallCreateResponse::Call::LlmModel::Variants,
250
+ metadata: T.nilable(T::Hash[Symbol, String]),
251
+ next_call_at: T.anything,
252
+ scheduled_at: T.anything,
253
+ to_phone_number: String
254
+ }
255
+ )
256
+ end
257
+ def to_hash
258
+ end
259
+
260
+ class CallAttempt < Revox::Internal::Type::BaseModel
261
+ OrHash =
262
+ T.type_alias do
263
+ T.any(
264
+ Revox::Models::CallCreateResponse::Call::CallAttempt,
265
+ Revox::Internal::AnyHash
266
+ )
267
+ end
268
+
269
+ # The ID of the call attempt.
270
+ sig { returns(String) }
271
+ attr_accessor :id
272
+
273
+ # The time the call was answered.
274
+ sig { returns(T.anything) }
275
+ attr_accessor :answered_at
276
+
277
+ # The time the call ended.
278
+ sig { returns(T.anything) }
279
+ attr_accessor :ended_at
280
+
281
+ # The phone number that was called. Formatted in E.164 format. Example:
282
+ # +1234567890
283
+ sig { returns(String) }
284
+ attr_accessor :phone_number
285
+
286
+ # The URL of the audio recording of the call.
287
+ sig { returns(T.nilable(String)) }
288
+ attr_accessor :recording_url
289
+
290
+ sig do
291
+ returns(
292
+ T.nilable(
293
+ Revox::Models::CallCreateResponse::Call::CallAttempt::Result::TaggedSymbol
294
+ )
295
+ )
296
+ end
297
+ attr_accessor :result
298
+
299
+ # The time the call started.
300
+ sig { returns(T.anything) }
301
+ attr_accessor :started_at
302
+
303
+ # The status of the call attempt.
304
+ sig do
305
+ returns(
306
+ Revox::Models::CallCreateResponse::Call::CallAttempt::Status::TaggedSymbol
307
+ )
308
+ end
309
+ attr_accessor :status
310
+
311
+ # The data extracted from the call, using the structured output config from the
312
+ # parent call object.
313
+ sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
314
+ attr_accessor :structured_output
315
+
316
+ # The transcript of the call.
317
+ sig do
318
+ returns(
319
+ T.nilable(
320
+ T::Array[
321
+ Revox::Models::CallCreateResponse::Call::CallAttempt::Transcript
322
+ ]
323
+ )
324
+ )
325
+ end
326
+ attr_accessor :transcript
327
+
328
+ # This represent a single call attempt. A call attempt is a single call made to
329
+ # the phone number.
330
+ sig do
331
+ params(
332
+ id: String,
333
+ answered_at: T.anything,
334
+ ended_at: T.anything,
335
+ phone_number: String,
336
+ recording_url: T.nilable(String),
337
+ result:
338
+ T.nilable(
339
+ Revox::Models::CallCreateResponse::Call::CallAttempt::Result::OrSymbol
340
+ ),
341
+ started_at: T.anything,
342
+ status:
343
+ Revox::Models::CallCreateResponse::Call::CallAttempt::Status::OrSymbol,
344
+ structured_output: T.nilable(T::Hash[Symbol, T.anything]),
345
+ transcript:
346
+ T.nilable(
347
+ T::Array[
348
+ Revox::Models::CallCreateResponse::Call::CallAttempt::Transcript::OrHash
349
+ ]
350
+ )
351
+ ).returns(T.attached_class)
352
+ end
353
+ def self.new(
354
+ # The ID of the call attempt.
355
+ id:,
356
+ # The time the call was answered.
357
+ answered_at:,
358
+ # The time the call ended.
359
+ ended_at:,
360
+ # The phone number that was called. Formatted in E.164 format. Example:
361
+ # +1234567890
362
+ phone_number:,
363
+ # The URL of the audio recording of the call.
364
+ recording_url:,
365
+ result:,
366
+ # The time the call started.
367
+ started_at:,
368
+ # The status of the call attempt.
369
+ status:,
370
+ # The data extracted from the call, using the structured output config from the
371
+ # parent call object.
372
+ structured_output: nil,
373
+ # The transcript of the call.
374
+ transcript: nil
375
+ )
376
+ end
377
+
378
+ sig do
379
+ override.returns(
380
+ {
381
+ id: String,
382
+ answered_at: T.anything,
383
+ ended_at: T.anything,
384
+ phone_number: String,
385
+ recording_url: T.nilable(String),
386
+ result:
387
+ T.nilable(
388
+ Revox::Models::CallCreateResponse::Call::CallAttempt::Result::TaggedSymbol
389
+ ),
390
+ started_at: T.anything,
391
+ status:
392
+ Revox::Models::CallCreateResponse::Call::CallAttempt::Status::TaggedSymbol,
393
+ structured_output: T.nilable(T::Hash[Symbol, T.anything]),
394
+ transcript:
395
+ T.nilable(
396
+ T::Array[
397
+ Revox::Models::CallCreateResponse::Call::CallAttempt::Transcript
398
+ ]
399
+ )
400
+ }
401
+ )
402
+ end
403
+ def to_hash
404
+ end
405
+
406
+ module Result
407
+ extend Revox::Internal::Type::Enum
408
+
409
+ TaggedSymbol =
410
+ T.type_alias do
411
+ T.all(
412
+ Symbol,
413
+ Revox::Models::CallCreateResponse::Call::CallAttempt::Result
414
+ )
415
+ end
416
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
417
+
418
+ IVR =
419
+ T.let(
420
+ :IVR,
421
+ Revox::Models::CallCreateResponse::Call::CallAttempt::Result::TaggedSymbol
422
+ )
423
+ VOICEMAIL =
424
+ T.let(
425
+ :voicemail,
426
+ Revox::Models::CallCreateResponse::Call::CallAttempt::Result::TaggedSymbol
427
+ )
428
+ HUMAN =
429
+ T.let(
430
+ :human,
431
+ Revox::Models::CallCreateResponse::Call::CallAttempt::Result::TaggedSymbol
432
+ )
433
+ UNKNOWN =
434
+ T.let(
435
+ :unknown,
436
+ Revox::Models::CallCreateResponse::Call::CallAttempt::Result::TaggedSymbol
437
+ )
438
+
439
+ sig do
440
+ override.returns(
441
+ T::Array[
442
+ Revox::Models::CallCreateResponse::Call::CallAttempt::Result::TaggedSymbol
443
+ ]
444
+ )
445
+ end
446
+ def self.values
447
+ end
448
+ end
449
+
450
+ # The status of the call attempt.
451
+ module Status
452
+ extend Revox::Internal::Type::Enum
453
+
454
+ TaggedSymbol =
455
+ T.type_alias do
456
+ T.all(
457
+ Symbol,
458
+ Revox::Models::CallCreateResponse::Call::CallAttempt::Status
459
+ )
460
+ end
461
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
462
+
463
+ QUEUED =
464
+ T.let(
465
+ :queued,
466
+ Revox::Models::CallCreateResponse::Call::CallAttempt::Status::TaggedSymbol
467
+ )
468
+ RINGING =
469
+ T.let(
470
+ :ringing,
471
+ Revox::Models::CallCreateResponse::Call::CallAttempt::Status::TaggedSymbol
472
+ )
473
+ ONGOING =
474
+ T.let(
475
+ :ongoing,
476
+ Revox::Models::CallCreateResponse::Call::CallAttempt::Status::TaggedSymbol
477
+ )
478
+ COMPLETED =
479
+ T.let(
480
+ :completed,
481
+ Revox::Models::CallCreateResponse::Call::CallAttempt::Status::TaggedSymbol
482
+ )
483
+
484
+ sig do
485
+ override.returns(
486
+ T::Array[
487
+ Revox::Models::CallCreateResponse::Call::CallAttempt::Status::TaggedSymbol
488
+ ]
489
+ )
490
+ end
491
+ def self.values
492
+ end
493
+ end
494
+
495
+ class Transcript < Revox::Internal::Type::BaseModel
496
+ OrHash =
497
+ T.type_alias do
498
+ T.any(
499
+ Revox::Models::CallCreateResponse::Call::CallAttempt::Transcript,
500
+ Revox::Internal::AnyHash
501
+ )
502
+ end
503
+
504
+ sig { returns(String) }
505
+ attr_accessor :content
506
+
507
+ sig do
508
+ returns(
509
+ Revox::Models::CallCreateResponse::Call::CallAttempt::Transcript::Role::TaggedSymbol
510
+ )
511
+ end
512
+ attr_accessor :role
513
+
514
+ sig do
515
+ returns(
516
+ T.nilable(
517
+ Revox::Models::CallCreateResponse::Call::CallAttempt::Transcript::ToolArguments::Variants
518
+ )
519
+ )
520
+ end
521
+ attr_reader :tool_arguments
522
+
523
+ sig do
524
+ params(
525
+ tool_arguments:
526
+ Revox::Models::CallCreateResponse::Call::CallAttempt::Transcript::ToolArguments::Variants
527
+ ).void
528
+ end
529
+ attr_writer :tool_arguments
530
+
531
+ sig { returns(T.nilable(T::Boolean)) }
532
+ attr_reader :tool_is_error
533
+
534
+ sig { params(tool_is_error: T::Boolean).void }
535
+ attr_writer :tool_is_error
536
+
537
+ sig { returns(T.nilable(String)) }
538
+ attr_reader :tool_name
539
+
540
+ sig { params(tool_name: String).void }
541
+ attr_writer :tool_name
542
+
543
+ sig do
544
+ params(
545
+ content: String,
546
+ role:
547
+ Revox::Models::CallCreateResponse::Call::CallAttempt::Transcript::Role::OrSymbol,
548
+ tool_arguments:
549
+ Revox::Models::CallCreateResponse::Call::CallAttempt::Transcript::ToolArguments::Variants,
550
+ tool_is_error: T::Boolean,
551
+ tool_name: String
552
+ ).returns(T.attached_class)
553
+ end
554
+ def self.new(
555
+ content:,
556
+ role:,
557
+ tool_arguments: nil,
558
+ tool_is_error: nil,
559
+ tool_name: nil
560
+ )
561
+ end
562
+
563
+ sig do
564
+ override.returns(
565
+ {
566
+ content: String,
567
+ role:
568
+ Revox::Models::CallCreateResponse::Call::CallAttempt::Transcript::Role::TaggedSymbol,
569
+ tool_arguments:
570
+ Revox::Models::CallCreateResponse::Call::CallAttempt::Transcript::ToolArguments::Variants,
571
+ tool_is_error: T::Boolean,
572
+ tool_name: String
573
+ }
574
+ )
575
+ end
576
+ def to_hash
577
+ end
578
+
579
+ module Role
580
+ extend Revox::Internal::Type::Enum
581
+
582
+ TaggedSymbol =
583
+ T.type_alias do
584
+ T.all(
585
+ Symbol,
586
+ Revox::Models::CallCreateResponse::Call::CallAttempt::Transcript::Role
587
+ )
588
+ end
589
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
590
+
591
+ USER =
592
+ T.let(
593
+ :user,
594
+ Revox::Models::CallCreateResponse::Call::CallAttempt::Transcript::Role::TaggedSymbol
595
+ )
596
+ ASSISTANT =
597
+ T.let(
598
+ :assistant,
599
+ Revox::Models::CallCreateResponse::Call::CallAttempt::Transcript::Role::TaggedSymbol
600
+ )
601
+ TOOL =
602
+ T.let(
603
+ :tool,
604
+ Revox::Models::CallCreateResponse::Call::CallAttempt::Transcript::Role::TaggedSymbol
605
+ )
606
+
607
+ sig do
608
+ override.returns(
609
+ T::Array[
610
+ Revox::Models::CallCreateResponse::Call::CallAttempt::Transcript::Role::TaggedSymbol
611
+ ]
612
+ )
613
+ end
614
+ def self.values
615
+ end
616
+ end
617
+
618
+ module ToolArguments
619
+ extend Revox::Internal::Type::Union
620
+
621
+ Variants =
622
+ T.type_alias { T.any(T::Hash[Symbol, T.anything], String) }
623
+
624
+ sig do
625
+ override.returns(
626
+ T::Array[
627
+ Revox::Models::CallCreateResponse::Call::CallAttempt::Transcript::ToolArguments::Variants
628
+ ]
629
+ )
630
+ end
631
+ def self.variants
632
+ end
633
+
634
+ UnionMember0Map =
635
+ T.let(
636
+ Revox::Internal::Type::HashOf[Revox::Internal::Type::Unknown],
637
+ Revox::Internal::Type::Converter
638
+ )
639
+ end
640
+ end
641
+ end
642
+
643
+ class CallRetryConfig < Revox::Internal::Type::BaseModel
644
+ OrHash =
645
+ T.type_alias do
646
+ T.any(
647
+ Revox::Models::CallCreateResponse::Call::CallRetryConfig,
648
+ Revox::Internal::AnyHash
649
+ )
650
+ end
651
+
652
+ sig do
653
+ returns(
654
+ T::Array[
655
+ Revox::Models::CallCreateResponse::Call::CallRetryConfig::CallingWindow
656
+ ]
657
+ )
658
+ end
659
+ attr_accessor :calling_windows
660
+
661
+ # Maximum number of call retry attempts. Default: 3.
662
+ sig { returns(Integer) }
663
+ attr_accessor :max_retry_attempts
664
+
665
+ # Optional IANA timezone identifier to override the automatic timezone detection
666
+ # from phone number. If not provided, timezone is determined from the recipient's
667
+ # phone number country code. Examples: 'America/New_York', 'Europe/Paris'.
668
+ sig { returns(T.nilable(String)) }
669
+ attr_accessor :timezone
670
+
671
+ # Configuration for call retry behavior including time windows, delays, and max
672
+ # iterations. If not provided, defaults will be used.
673
+ sig do
674
+ params(
675
+ calling_windows:
676
+ T::Array[
677
+ Revox::Models::CallCreateResponse::Call::CallRetryConfig::CallingWindow::OrHash
678
+ ],
679
+ max_retry_attempts: Integer,
680
+ timezone: T.nilable(String)
681
+ ).returns(T.attached_class)
682
+ end
683
+ def self.new(
684
+ calling_windows:,
685
+ # Maximum number of call retry attempts. Default: 3.
686
+ max_retry_attempts:,
687
+ # Optional IANA timezone identifier to override the automatic timezone detection
688
+ # from phone number. If not provided, timezone is determined from the recipient's
689
+ # phone number country code. Examples: 'America/New_York', 'Europe/Paris'.
690
+ timezone: nil
691
+ )
692
+ end
693
+
694
+ sig do
695
+ override.returns(
696
+ {
697
+ calling_windows:
698
+ T::Array[
699
+ Revox::Models::CallCreateResponse::Call::CallRetryConfig::CallingWindow
700
+ ],
701
+ max_retry_attempts: Integer,
702
+ timezone: T.nilable(String)
703
+ }
704
+ )
705
+ end
706
+ def to_hash
707
+ end
708
+
709
+ class CallingWindow < Revox::Internal::Type::BaseModel
710
+ OrHash =
711
+ T.type_alias do
712
+ T.any(
713
+ Revox::Models::CallCreateResponse::Call::CallRetryConfig::CallingWindow,
714
+ Revox::Internal::AnyHash
715
+ )
716
+ end
717
+
718
+ # End time for the calling window in the recipient's timezone (or
719
+ # timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
720
+ # Examples: '17:00', '6pm'. Default: '18:00'.
721
+ sig { returns(String) }
722
+ attr_accessor :calling_window_end_time
723
+
724
+ # Start time for the calling window in the recipient's timezone (or
725
+ # timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
726
+ # Examples: '09:00', '10am'. Default: '10:00'.
727
+ sig { returns(String) }
728
+ attr_accessor :calling_window_start_time
729
+
730
+ # Delay between retry attempts in seconds. Default: 7200 (2 hours).
731
+ sig { returns(Integer) }
732
+ attr_accessor :retry_delay_seconds
733
+
734
+ sig do
735
+ params(
736
+ calling_window_end_time: String,
737
+ calling_window_start_time: String,
738
+ retry_delay_seconds: Integer
739
+ ).returns(T.attached_class)
740
+ end
741
+ def self.new(
742
+ # End time for the calling window in the recipient's timezone (or
743
+ # timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
744
+ # Examples: '17:00', '6pm'. Default: '18:00'.
745
+ calling_window_end_time:,
746
+ # Start time for the calling window in the recipient's timezone (or
747
+ # timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
748
+ # Examples: '09:00', '10am'. Default: '10:00'.
749
+ calling_window_start_time:,
750
+ # Delay between retry attempts in seconds. Default: 7200 (2 hours).
751
+ retry_delay_seconds:
752
+ )
753
+ end
754
+
755
+ sig do
756
+ override.returns(
757
+ {
758
+ calling_window_end_time: String,
759
+ calling_window_start_time: String,
760
+ retry_delay_seconds: Integer
761
+ }
762
+ )
763
+ end
764
+ def to_hash
765
+ end
766
+ end
767
+ end
768
+
769
+ # Whether the call is inbound or outbound.
770
+ module Direction
771
+ extend Revox::Internal::Type::Enum
772
+
773
+ TaggedSymbol =
774
+ T.type_alias do
775
+ T.all(Symbol, Revox::Models::CallCreateResponse::Call::Direction)
776
+ end
777
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
778
+
779
+ INBOUND =
780
+ T.let(
781
+ :inbound,
782
+ Revox::Models::CallCreateResponse::Call::Direction::TaggedSymbol
783
+ )
784
+ OUTBOUND =
785
+ T.let(
786
+ :outbound,
787
+ Revox::Models::CallCreateResponse::Call::Direction::TaggedSymbol
788
+ )
789
+
790
+ sig do
791
+ override.returns(
792
+ T::Array[
793
+ Revox::Models::CallCreateResponse::Call::Direction::TaggedSymbol
794
+ ]
795
+ )
796
+ end
797
+ def self.values
798
+ end
799
+ end
800
+
801
+ class LastCallAttempt < Revox::Internal::Type::BaseModel
802
+ OrHash =
803
+ T.type_alias do
804
+ T.any(
805
+ Revox::Models::CallCreateResponse::Call::LastCallAttempt,
806
+ Revox::Internal::AnyHash
807
+ )
808
+ end
809
+
810
+ # The ID of the call attempt.
811
+ sig { returns(String) }
812
+ attr_accessor :id
813
+
814
+ # The time the call was answered.
815
+ sig { returns(T.anything) }
816
+ attr_accessor :answered_at
817
+
818
+ # The time the call ended.
819
+ sig { returns(T.anything) }
820
+ attr_accessor :ended_at
821
+
822
+ # The phone number that was called. Formatted in E.164 format. Example:
823
+ # +1234567890
824
+ sig { returns(String) }
825
+ attr_accessor :phone_number
826
+
827
+ # The URL of the audio recording of the call.
828
+ sig { returns(T.nilable(String)) }
829
+ attr_accessor :recording_url
830
+
831
+ sig do
832
+ returns(
833
+ T.nilable(
834
+ Revox::Models::CallCreateResponse::Call::LastCallAttempt::Result::TaggedSymbol
835
+ )
836
+ )
837
+ end
838
+ attr_accessor :result
839
+
840
+ # The time the call started.
841
+ sig { returns(T.anything) }
842
+ attr_accessor :started_at
843
+
844
+ # The status of the call attempt.
845
+ sig do
846
+ returns(
847
+ Revox::Models::CallCreateResponse::Call::LastCallAttempt::Status::TaggedSymbol
848
+ )
849
+ end
850
+ attr_accessor :status
851
+
852
+ # The data extracted from the call, using the structured output config from the
853
+ # parent call object.
854
+ sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
855
+ attr_accessor :structured_output
856
+
857
+ # The transcript of the call.
858
+ sig do
859
+ returns(
860
+ T.nilable(
861
+ T::Array[
862
+ Revox::Models::CallCreateResponse::Call::LastCallAttempt::Transcript
863
+ ]
864
+ )
865
+ )
866
+ end
867
+ attr_accessor :transcript
868
+
869
+ # This represent a single call attempt. A call attempt is a single call made to
870
+ # the phone number.
871
+ sig do
872
+ params(
873
+ id: String,
874
+ answered_at: T.anything,
875
+ ended_at: T.anything,
876
+ phone_number: String,
877
+ recording_url: T.nilable(String),
878
+ result:
879
+ T.nilable(
880
+ Revox::Models::CallCreateResponse::Call::LastCallAttempt::Result::OrSymbol
881
+ ),
882
+ started_at: T.anything,
883
+ status:
884
+ Revox::Models::CallCreateResponse::Call::LastCallAttempt::Status::OrSymbol,
885
+ structured_output: T.nilable(T::Hash[Symbol, T.anything]),
886
+ transcript:
887
+ T.nilable(
888
+ T::Array[
889
+ Revox::Models::CallCreateResponse::Call::LastCallAttempt::Transcript::OrHash
890
+ ]
891
+ )
892
+ ).returns(T.attached_class)
893
+ end
894
+ def self.new(
895
+ # The ID of the call attempt.
896
+ id:,
897
+ # The time the call was answered.
898
+ answered_at:,
899
+ # The time the call ended.
900
+ ended_at:,
901
+ # The phone number that was called. Formatted in E.164 format. Example:
902
+ # +1234567890
903
+ phone_number:,
904
+ # The URL of the audio recording of the call.
905
+ recording_url:,
906
+ result:,
907
+ # The time the call started.
908
+ started_at:,
909
+ # The status of the call attempt.
910
+ status:,
911
+ # The data extracted from the call, using the structured output config from the
912
+ # parent call object.
913
+ structured_output: nil,
914
+ # The transcript of the call.
915
+ transcript: nil
916
+ )
917
+ end
918
+
919
+ sig do
920
+ override.returns(
921
+ {
922
+ id: String,
923
+ answered_at: T.anything,
924
+ ended_at: T.anything,
925
+ phone_number: String,
926
+ recording_url: T.nilable(String),
927
+ result:
928
+ T.nilable(
929
+ Revox::Models::CallCreateResponse::Call::LastCallAttempt::Result::TaggedSymbol
930
+ ),
931
+ started_at: T.anything,
932
+ status:
933
+ Revox::Models::CallCreateResponse::Call::LastCallAttempt::Status::TaggedSymbol,
934
+ structured_output: T.nilable(T::Hash[Symbol, T.anything]),
935
+ transcript:
936
+ T.nilable(
937
+ T::Array[
938
+ Revox::Models::CallCreateResponse::Call::LastCallAttempt::Transcript
939
+ ]
940
+ )
941
+ }
942
+ )
943
+ end
944
+ def to_hash
945
+ end
946
+
947
+ module Result
948
+ extend Revox::Internal::Type::Enum
949
+
950
+ TaggedSymbol =
951
+ T.type_alias do
952
+ T.all(
953
+ Symbol,
954
+ Revox::Models::CallCreateResponse::Call::LastCallAttempt::Result
955
+ )
956
+ end
957
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
958
+
959
+ IVR =
960
+ T.let(
961
+ :IVR,
962
+ Revox::Models::CallCreateResponse::Call::LastCallAttempt::Result::TaggedSymbol
963
+ )
964
+ VOICEMAIL =
965
+ T.let(
966
+ :voicemail,
967
+ Revox::Models::CallCreateResponse::Call::LastCallAttempt::Result::TaggedSymbol
968
+ )
969
+ HUMAN =
970
+ T.let(
971
+ :human,
972
+ Revox::Models::CallCreateResponse::Call::LastCallAttempt::Result::TaggedSymbol
973
+ )
974
+ UNKNOWN =
975
+ T.let(
976
+ :unknown,
977
+ Revox::Models::CallCreateResponse::Call::LastCallAttempt::Result::TaggedSymbol
978
+ )
979
+
980
+ sig do
981
+ override.returns(
982
+ T::Array[
983
+ Revox::Models::CallCreateResponse::Call::LastCallAttempt::Result::TaggedSymbol
984
+ ]
985
+ )
986
+ end
987
+ def self.values
988
+ end
989
+ end
990
+
991
+ # The status of the call attempt.
992
+ module Status
993
+ extend Revox::Internal::Type::Enum
994
+
995
+ TaggedSymbol =
996
+ T.type_alias do
997
+ T.all(
998
+ Symbol,
999
+ Revox::Models::CallCreateResponse::Call::LastCallAttempt::Status
1000
+ )
1001
+ end
1002
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1003
+
1004
+ QUEUED =
1005
+ T.let(
1006
+ :queued,
1007
+ Revox::Models::CallCreateResponse::Call::LastCallAttempt::Status::TaggedSymbol
1008
+ )
1009
+ RINGING =
1010
+ T.let(
1011
+ :ringing,
1012
+ Revox::Models::CallCreateResponse::Call::LastCallAttempt::Status::TaggedSymbol
1013
+ )
1014
+ ONGOING =
1015
+ T.let(
1016
+ :ongoing,
1017
+ Revox::Models::CallCreateResponse::Call::LastCallAttempt::Status::TaggedSymbol
1018
+ )
1019
+ COMPLETED =
1020
+ T.let(
1021
+ :completed,
1022
+ Revox::Models::CallCreateResponse::Call::LastCallAttempt::Status::TaggedSymbol
1023
+ )
1024
+
1025
+ sig do
1026
+ override.returns(
1027
+ T::Array[
1028
+ Revox::Models::CallCreateResponse::Call::LastCallAttempt::Status::TaggedSymbol
1029
+ ]
1030
+ )
1031
+ end
1032
+ def self.values
1033
+ end
1034
+ end
1035
+
1036
+ class Transcript < Revox::Internal::Type::BaseModel
1037
+ OrHash =
1038
+ T.type_alias do
1039
+ T.any(
1040
+ Revox::Models::CallCreateResponse::Call::LastCallAttempt::Transcript,
1041
+ Revox::Internal::AnyHash
1042
+ )
1043
+ end
1044
+
1045
+ sig { returns(String) }
1046
+ attr_accessor :content
1047
+
1048
+ sig do
1049
+ returns(
1050
+ Revox::Models::CallCreateResponse::Call::LastCallAttempt::Transcript::Role::TaggedSymbol
1051
+ )
1052
+ end
1053
+ attr_accessor :role
1054
+
1055
+ sig do
1056
+ returns(
1057
+ T.nilable(
1058
+ Revox::Models::CallCreateResponse::Call::LastCallAttempt::Transcript::ToolArguments::Variants
1059
+ )
1060
+ )
1061
+ end
1062
+ attr_reader :tool_arguments
1063
+
1064
+ sig do
1065
+ params(
1066
+ tool_arguments:
1067
+ Revox::Models::CallCreateResponse::Call::LastCallAttempt::Transcript::ToolArguments::Variants
1068
+ ).void
1069
+ end
1070
+ attr_writer :tool_arguments
1071
+
1072
+ sig { returns(T.nilable(T::Boolean)) }
1073
+ attr_reader :tool_is_error
1074
+
1075
+ sig { params(tool_is_error: T::Boolean).void }
1076
+ attr_writer :tool_is_error
1077
+
1078
+ sig { returns(T.nilable(String)) }
1079
+ attr_reader :tool_name
1080
+
1081
+ sig { params(tool_name: String).void }
1082
+ attr_writer :tool_name
1083
+
1084
+ sig do
1085
+ params(
1086
+ content: String,
1087
+ role:
1088
+ Revox::Models::CallCreateResponse::Call::LastCallAttempt::Transcript::Role::OrSymbol,
1089
+ tool_arguments:
1090
+ Revox::Models::CallCreateResponse::Call::LastCallAttempt::Transcript::ToolArguments::Variants,
1091
+ tool_is_error: T::Boolean,
1092
+ tool_name: String
1093
+ ).returns(T.attached_class)
1094
+ end
1095
+ def self.new(
1096
+ content:,
1097
+ role:,
1098
+ tool_arguments: nil,
1099
+ tool_is_error: nil,
1100
+ tool_name: nil
1101
+ )
1102
+ end
1103
+
1104
+ sig do
1105
+ override.returns(
1106
+ {
1107
+ content: String,
1108
+ role:
1109
+ Revox::Models::CallCreateResponse::Call::LastCallAttempt::Transcript::Role::TaggedSymbol,
1110
+ tool_arguments:
1111
+ Revox::Models::CallCreateResponse::Call::LastCallAttempt::Transcript::ToolArguments::Variants,
1112
+ tool_is_error: T::Boolean,
1113
+ tool_name: String
1114
+ }
1115
+ )
1116
+ end
1117
+ def to_hash
1118
+ end
1119
+
1120
+ module Role
1121
+ extend Revox::Internal::Type::Enum
1122
+
1123
+ TaggedSymbol =
1124
+ T.type_alias do
1125
+ T.all(
1126
+ Symbol,
1127
+ Revox::Models::CallCreateResponse::Call::LastCallAttempt::Transcript::Role
1128
+ )
1129
+ end
1130
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1131
+
1132
+ USER =
1133
+ T.let(
1134
+ :user,
1135
+ Revox::Models::CallCreateResponse::Call::LastCallAttempt::Transcript::Role::TaggedSymbol
1136
+ )
1137
+ ASSISTANT =
1138
+ T.let(
1139
+ :assistant,
1140
+ Revox::Models::CallCreateResponse::Call::LastCallAttempt::Transcript::Role::TaggedSymbol
1141
+ )
1142
+ TOOL =
1143
+ T.let(
1144
+ :tool,
1145
+ Revox::Models::CallCreateResponse::Call::LastCallAttempt::Transcript::Role::TaggedSymbol
1146
+ )
1147
+
1148
+ sig do
1149
+ override.returns(
1150
+ T::Array[
1151
+ Revox::Models::CallCreateResponse::Call::LastCallAttempt::Transcript::Role::TaggedSymbol
1152
+ ]
1153
+ )
1154
+ end
1155
+ def self.values
1156
+ end
1157
+ end
1158
+
1159
+ module ToolArguments
1160
+ extend Revox::Internal::Type::Union
1161
+
1162
+ Variants =
1163
+ T.type_alias { T.any(T::Hash[Symbol, T.anything], String) }
1164
+
1165
+ sig do
1166
+ override.returns(
1167
+ T::Array[
1168
+ Revox::Models::CallCreateResponse::Call::LastCallAttempt::Transcript::ToolArguments::Variants
1169
+ ]
1170
+ )
1171
+ end
1172
+ def self.variants
1173
+ end
1174
+
1175
+ UnionMember0Map =
1176
+ T.let(
1177
+ Revox::Internal::Type::HashOf[Revox::Internal::Type::Unknown],
1178
+ Revox::Internal::Type::Converter
1179
+ )
1180
+ end
1181
+ end
1182
+ end
1183
+
1184
+ module LlmModel
1185
+ extend Revox::Internal::Type::Union
1186
+
1187
+ Variants =
1188
+ T.type_alias do
1189
+ T.any(
1190
+ Revox::Models::CallCreateResponse::Call::LlmModel::UnionMember0,
1191
+ Revox::Models::CallCreateResponse::Call::LlmModel::UnionMember1
1192
+ )
1193
+ end
1194
+
1195
+ class UnionMember0 < Revox::Internal::Type::BaseModel
1196
+ OrHash =
1197
+ T.type_alias do
1198
+ T.any(
1199
+ Revox::Models::CallCreateResponse::Call::LlmModel::UnionMember0,
1200
+ Revox::Internal::AnyHash
1201
+ )
1202
+ end
1203
+
1204
+ sig do
1205
+ returns(
1206
+ Revox::Models::CallCreateResponse::Call::LlmModel::UnionMember0::Name::TaggedSymbol
1207
+ )
1208
+ end
1209
+ attr_accessor :name
1210
+
1211
+ sig { returns(Symbol) }
1212
+ attr_accessor :type
1213
+
1214
+ sig do
1215
+ params(
1216
+ name:
1217
+ Revox::Models::CallCreateResponse::Call::LlmModel::UnionMember0::Name::OrSymbol,
1218
+ type: Symbol
1219
+ ).returns(T.attached_class)
1220
+ end
1221
+ def self.new(name:, type: :"dedicated-instance")
1222
+ end
1223
+
1224
+ sig do
1225
+ override.returns(
1226
+ {
1227
+ name:
1228
+ Revox::Models::CallCreateResponse::Call::LlmModel::UnionMember0::Name::TaggedSymbol,
1229
+ type: Symbol
1230
+ }
1231
+ )
1232
+ end
1233
+ def to_hash
1234
+ end
1235
+
1236
+ module Name
1237
+ extend Revox::Internal::Type::Enum
1238
+
1239
+ TaggedSymbol =
1240
+ T.type_alias do
1241
+ T.all(
1242
+ Symbol,
1243
+ Revox::Models::CallCreateResponse::Call::LlmModel::UnionMember0::Name
1244
+ )
1245
+ end
1246
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1247
+
1248
+ GPT_4_1 =
1249
+ T.let(
1250
+ :"gpt-4.1",
1251
+ Revox::Models::CallCreateResponse::Call::LlmModel::UnionMember0::Name::TaggedSymbol
1252
+ )
1253
+ MINISTRAL_3_8B_INSTRUCT =
1254
+ T.let(
1255
+ :"ministral-3-8b-instruct",
1256
+ Revox::Models::CallCreateResponse::Call::LlmModel::UnionMember0::Name::TaggedSymbol
1257
+ )
1258
+
1259
+ sig do
1260
+ override.returns(
1261
+ T::Array[
1262
+ Revox::Models::CallCreateResponse::Call::LlmModel::UnionMember0::Name::TaggedSymbol
1263
+ ]
1264
+ )
1265
+ end
1266
+ def self.values
1267
+ end
1268
+ end
1269
+ end
1270
+
1271
+ class UnionMember1 < Revox::Internal::Type::BaseModel
1272
+ OrHash =
1273
+ T.type_alias do
1274
+ T.any(
1275
+ Revox::Models::CallCreateResponse::Call::LlmModel::UnionMember1,
1276
+ Revox::Internal::AnyHash
1277
+ )
1278
+ end
1279
+
1280
+ # The model ID to use from OpenRouter. eg: openai/gpt-4.1
1281
+ sig { returns(String) }
1282
+ attr_accessor :openrouter_model_id
1283
+
1284
+ # The provider to use from OpenRouter. eg: nebius, openai, azure, etc.
1285
+ sig { returns(String) }
1286
+ attr_accessor :openrouter_provider
1287
+
1288
+ # Use a model from OpenRouter.
1289
+ sig { returns(Symbol) }
1290
+ attr_accessor :type
1291
+
1292
+ sig do
1293
+ params(
1294
+ openrouter_model_id: String,
1295
+ openrouter_provider: String,
1296
+ type: Symbol
1297
+ ).returns(T.attached_class)
1298
+ end
1299
+ def self.new(
1300
+ # The model ID to use from OpenRouter. eg: openai/gpt-4.1
1301
+ openrouter_model_id:,
1302
+ # The provider to use from OpenRouter. eg: nebius, openai, azure, etc.
1303
+ openrouter_provider:,
1304
+ # Use a model from OpenRouter.
1305
+ type: :openrouter
1306
+ )
1307
+ end
1308
+
1309
+ sig do
1310
+ override.returns(
1311
+ {
1312
+ openrouter_model_id: String,
1313
+ openrouter_provider: String,
1314
+ type: Symbol
1315
+ }
1316
+ )
1317
+ end
1318
+ def to_hash
1319
+ end
1320
+ end
1321
+
1322
+ sig do
1323
+ override.returns(
1324
+ T::Array[
1325
+ Revox::Models::CallCreateResponse::Call::LlmModel::Variants
1326
+ ]
1327
+ )
1328
+ end
1329
+ def self.variants
1330
+ end
1331
+ end
1332
+ end
1333
+ end
1334
+ end
1335
+ end