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,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Revox
4
+ module Internal
5
+ extend Revox::Internal::Util::SorbetRuntimeSupport
6
+
7
+ OMIT =
8
+ Object.new.tap do
9
+ _1.define_singleton_method(:inspect) { "#<#{Revox::Internal}::OMIT>" }
10
+ end
11
+ .freeze
12
+
13
+ define_sorbet_constant!(:AnyHash) do
14
+ T.type_alias { T::Hash[Symbol, T.anything] }
15
+ end
16
+ define_sorbet_constant!(:FileInput) do
17
+ T.type_alias { T.any(Pathname, StringIO, IO, String, Revox::FilePart) }
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,467 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Revox
4
+ module Models
5
+ # @see Revox::Resources::Assistants#create
6
+ class AssistantCreateParams < Revox::Internal::Type::BaseModel
7
+ extend Revox::Internal::Type::RequestParameters::Converter
8
+ include Revox::Internal::Type::RequestParameters
9
+
10
+ # @!attribute name
11
+ #
12
+ # @return [String]
13
+ required :name, String
14
+
15
+ # @!attribute prompt
16
+ # The prompt to use for the call. This will be given to the LLM (gpt-4.1)
17
+ #
18
+ # @return [String]
19
+ required :prompt, String
20
+
21
+ # @!attribute background_sound
22
+ # The background sound to play during the call. Useful to give the impression that
23
+ # your AI agent is in an office, in the street, or anywhere else you want.
24
+ #
25
+ # @return [Symbol, Revox::Models::AssistantCreateParams::BackgroundSound, nil]
26
+ optional :background_sound, enum: -> { Revox::AssistantCreateParams::BackgroundSound }, nil?: true
27
+
28
+ # @!attribute calendly
29
+ #
30
+ # @return [Revox::Models::AssistantCreateParams::Calendly, nil]
31
+ optional :calendly, -> { Revox::AssistantCreateParams::Calendly }, nil?: true
32
+
33
+ # @!attribute call_retry_config
34
+ # Configuration for call retry behavior including time windows, delays, and max
35
+ # iterations. If not provided, defaults will be used.
36
+ #
37
+ # @return [Revox::Models::AssistantCreateParams::CallRetryConfig, nil]
38
+ optional :call_retry_config, -> { Revox::AssistantCreateParams::CallRetryConfig }
39
+
40
+ # @!attribute end_of_call_sentence
41
+ # Optional message to say when the agent decides to end the call.
42
+ #
43
+ # @return [String, nil]
44
+ optional :end_of_call_sentence, String
45
+
46
+ # @!attribute faq_items
47
+ # FAQ items to associate with this assistant. When provided, replaces all existing
48
+ # FAQ items.
49
+ #
50
+ # @return [Array<Revox::Models::AssistantCreateParams::FaqItem>, nil]
51
+ optional :faq_items, -> { Revox::Internal::Type::ArrayOf[Revox::AssistantCreateParams::FaqItem] }
52
+
53
+ # @!attribute first_sentence
54
+ # The first sentence to use for the call. This will be given to the LLM
55
+ #
56
+ # @return [String, nil]
57
+ optional :first_sentence, String
58
+
59
+ # @!attribute first_sentence_delay_ms
60
+ # Delay in milliseconds before speaking the first sentence. Default: 400.
61
+ #
62
+ # @return [Integer, nil]
63
+ optional :first_sentence_delay_ms, Integer
64
+
65
+ # @!attribute first_sentence_mode
66
+ # How the first sentence should be handled. "generated" means the LLM will
67
+ # generate a response based on the first_sentence instruction. "static" means the
68
+ # first_sentence will be spoken exactly as provided. "none" means the agent will
69
+ # not speak first and will wait for the user.
70
+ #
71
+ # @return [Symbol, Revox::Models::AssistantCreateParams::FirstSentenceMode, nil]
72
+ optional :first_sentence_mode, enum: -> { Revox::AssistantCreateParams::FirstSentenceMode }
73
+
74
+ # @!attribute ivr_navigation_enabled
75
+ # Enable IVR navigation tools. When enabled, the assistant can send DTMF tones and
76
+ # skip turns to navigate phone menus.
77
+ #
78
+ # @return [Boolean, nil]
79
+ optional :ivr_navigation_enabled, Revox::Internal::Type::Boolean
80
+
81
+ # @!attribute llm_model
82
+ #
83
+ # @return [Revox::Models::AssistantCreateParams::LlmModel::UnionMember0, Revox::Models::AssistantCreateParams::LlmModel::UnionMember1, nil]
84
+ optional :llm_model, union: -> { Revox::AssistantCreateParams::LlmModel }
85
+
86
+ # @!attribute max_call_duration_secs
87
+ # The maximum duration of the call in seconds. This is the maximum time the call
88
+ # will be allowed to run.
89
+ #
90
+ # @return [Float, nil]
91
+ optional :max_call_duration_secs, Float
92
+
93
+ # @!attribute structured_output_config
94
+ # The structured output config to use for the call. This is used to extract the
95
+ # data from the call (like email, name, company name, etc.).
96
+ #
97
+ # @return [Array<Revox::Models::AssistantCreateParams::StructuredOutputConfig>, nil]
98
+ optional :structured_output_config,
99
+ -> { Revox::Internal::Type::ArrayOf[Revox::AssistantCreateParams::StructuredOutputConfig] }
100
+
101
+ # @!attribute transfer_phone_number
102
+ # Phone number to transfer calls to when users request to speak to a human agent
103
+ # in E.164 format (e.g. +1234567890).
104
+ #
105
+ # @return [String, nil]
106
+ optional :transfer_phone_number, String, nil?: true
107
+
108
+ # @!attribute voice
109
+ # The voice to use for the call. You can get the list of voices using the /voices
110
+ # endpoint
111
+ #
112
+ # @return [Revox::Models::AssistantCreateParams::Voice, nil]
113
+ optional :voice, -> { Revox::AssistantCreateParams::Voice }
114
+
115
+ # @!attribute voicemail_message
116
+ # If set, when voicemail is detected the agent will speak this message then hang
117
+ # up; if null, hang up immediately.
118
+ #
119
+ # @return [String, nil]
120
+ optional :voicemail_message, String, nil?: true
121
+
122
+ # @!attribute webhook_url
123
+ # The webhook URL to call when the call is completed.
124
+ #
125
+ # @return [String, nil]
126
+ optional :webhook_url, String
127
+
128
+ # @!method initialize(name:, prompt:, background_sound: nil, calendly: nil, call_retry_config: nil, end_of_call_sentence: nil, faq_items: nil, first_sentence: nil, first_sentence_delay_ms: nil, first_sentence_mode: nil, ivr_navigation_enabled: nil, llm_model: nil, max_call_duration_secs: nil, structured_output_config: nil, transfer_phone_number: nil, voice: nil, voicemail_message: nil, webhook_url: nil, request_options: {})
129
+ # Some parameter documentations has been truncated, see
130
+ # {Revox::Models::AssistantCreateParams} for more details.
131
+ #
132
+ # @param name [String]
133
+ #
134
+ # @param prompt [String] The prompt to use for the call. This will be given to the LLM (gpt-4.1)
135
+ #
136
+ # @param background_sound [Symbol, Revox::Models::AssistantCreateParams::BackgroundSound, nil] The background sound to play during the call. Useful to give the impression that
137
+ #
138
+ # @param calendly [Revox::Models::AssistantCreateParams::Calendly, nil]
139
+ #
140
+ # @param call_retry_config [Revox::Models::AssistantCreateParams::CallRetryConfig] Configuration for call retry behavior including time windows, delays, and max it
141
+ #
142
+ # @param end_of_call_sentence [String] Optional message to say when the agent decides to end the call.
143
+ #
144
+ # @param faq_items [Array<Revox::Models::AssistantCreateParams::FaqItem>] FAQ items to associate with this assistant. When provided, replaces all existing
145
+ #
146
+ # @param first_sentence [String] The first sentence to use for the call. This will be given to the LLM
147
+ #
148
+ # @param first_sentence_delay_ms [Integer] Delay in milliseconds before speaking the first sentence. Default: 400.
149
+ #
150
+ # @param first_sentence_mode [Symbol, Revox::Models::AssistantCreateParams::FirstSentenceMode] How the first sentence should be handled. "generated" means the LLM will generat
151
+ #
152
+ # @param ivr_navigation_enabled [Boolean] Enable IVR navigation tools. When enabled, the assistant can send DTMF tones and
153
+ #
154
+ # @param llm_model [Revox::Models::AssistantCreateParams::LlmModel::UnionMember0, Revox::Models::AssistantCreateParams::LlmModel::UnionMember1]
155
+ #
156
+ # @param max_call_duration_secs [Float] The maximum duration of the call in seconds. This is the maximum time the call w
157
+ #
158
+ # @param structured_output_config [Array<Revox::Models::AssistantCreateParams::StructuredOutputConfig>] The structured output config to use for the call. This is used to extract the da
159
+ #
160
+ # @param transfer_phone_number [String, nil] Phone number to transfer calls to when users request to speak to a human agent i
161
+ #
162
+ # @param voice [Revox::Models::AssistantCreateParams::Voice] The voice to use for the call. You can get the list of voices using the /voices
163
+ #
164
+ # @param voicemail_message [String, nil] If set, when voicemail is detected the agent will speak this message then hang u
165
+ #
166
+ # @param webhook_url [String] The webhook URL to call when the call is completed.
167
+ #
168
+ # @param request_options [Revox::RequestOptions, Hash{Symbol=>Object}]
169
+
170
+ # The background sound to play during the call. Useful to give the impression that
171
+ # your AI agent is in an office, in the street, or anywhere else you want.
172
+ module BackgroundSound
173
+ extend Revox::Internal::Type::Enum
174
+
175
+ AUDIO_OFFICE_OGG = :"audio/office.ogg"
176
+
177
+ # @!method self.values
178
+ # @return [Array<Symbol>]
179
+ end
180
+
181
+ class Calendly < Revox::Internal::Type::BaseModel
182
+ # @!attribute connection_id
183
+ # The connection ID representing the link between your Calendly account and Revox.
184
+ #
185
+ # @return [String]
186
+ required :connection_id, String
187
+
188
+ # @!attribute event_type_id
189
+ # The event type ID representing the event type to schedule. (eg:
190
+ # https://api.calendly.com/event_types/b2330295-2a91-4a1d-bb73-99e7707663d5)
191
+ #
192
+ # @return [String]
193
+ required :event_type_id, String
194
+
195
+ # @!method initialize(connection_id:, event_type_id:)
196
+ # Some parameter documentations has been truncated, see
197
+ # {Revox::Models::AssistantCreateParams::Calendly} for more details.
198
+ #
199
+ # @param connection_id [String] The connection ID representing the link between your Calendly account and Revox.
200
+ #
201
+ # @param event_type_id [String] The event type ID representing the event type to schedule. (eg: https://api.cale
202
+ end
203
+
204
+ class CallRetryConfig < Revox::Internal::Type::BaseModel
205
+ # @!attribute calling_windows
206
+ #
207
+ # @return [Array<Revox::Models::AssistantCreateParams::CallRetryConfig::CallingWindow>]
208
+ required :calling_windows,
209
+ -> { Revox::Internal::Type::ArrayOf[Revox::AssistantCreateParams::CallRetryConfig::CallingWindow] }
210
+
211
+ # @!attribute max_retry_attempts
212
+ # Maximum number of call retry attempts. Default: 3.
213
+ #
214
+ # @return [Integer]
215
+ required :max_retry_attempts, Integer
216
+
217
+ # @!attribute timezone
218
+ # Optional IANA timezone identifier to override the automatic timezone detection
219
+ # from phone number. If not provided, timezone is determined from the recipient's
220
+ # phone number country code. Examples: 'America/New_York', 'Europe/Paris'.
221
+ #
222
+ # @return [String, nil]
223
+ optional :timezone, String, nil?: true
224
+
225
+ # @!method initialize(calling_windows:, max_retry_attempts:, timezone: nil)
226
+ # Some parameter documentations has been truncated, see
227
+ # {Revox::Models::AssistantCreateParams::CallRetryConfig} for more details.
228
+ #
229
+ # Configuration for call retry behavior including time windows, delays, and max
230
+ # iterations. If not provided, defaults will be used.
231
+ #
232
+ # @param calling_windows [Array<Revox::Models::AssistantCreateParams::CallRetryConfig::CallingWindow>]
233
+ #
234
+ # @param max_retry_attempts [Integer] Maximum number of call retry attempts. Default: 3.
235
+ #
236
+ # @param timezone [String, nil] Optional IANA timezone identifier to override the automatic timezone detection f
237
+
238
+ class CallingWindow < Revox::Internal::Type::BaseModel
239
+ # @!attribute calling_window_end_time
240
+ # End time for the calling window in the recipient's timezone (or
241
+ # timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
242
+ # Examples: '17:00', '6pm'. Default: '18:00'.
243
+ #
244
+ # @return [String]
245
+ required :calling_window_end_time, String
246
+
247
+ # @!attribute calling_window_start_time
248
+ # Start time for the calling window in the recipient's timezone (or
249
+ # timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
250
+ # Examples: '09:00', '10am'. Default: '10:00'.
251
+ #
252
+ # @return [String]
253
+ required :calling_window_start_time, String
254
+
255
+ # @!attribute retry_delay_seconds
256
+ # Delay between retry attempts in seconds. Default: 7200 (2 hours).
257
+ #
258
+ # @return [Integer]
259
+ required :retry_delay_seconds, Integer
260
+
261
+ # @!method initialize(calling_window_end_time:, calling_window_start_time:, retry_delay_seconds:)
262
+ # Some parameter documentations has been truncated, see
263
+ # {Revox::Models::AssistantCreateParams::CallRetryConfig::CallingWindow} for more
264
+ # details.
265
+ #
266
+ # @param calling_window_end_time [String] End time for the calling window in the recipient's timezone (or timezone_overrid
267
+ #
268
+ # @param calling_window_start_time [String] Start time for the calling window in the recipient's timezone (or timezone_overr
269
+ #
270
+ # @param retry_delay_seconds [Integer] Delay between retry attempts in seconds. Default: 7200 (2 hours).
271
+ end
272
+ end
273
+
274
+ class FaqItem < Revox::Internal::Type::BaseModel
275
+ # @!attribute answer
276
+ #
277
+ # @return [String]
278
+ required :answer, String
279
+
280
+ # @!attribute question
281
+ #
282
+ # @return [String]
283
+ required :question, String
284
+
285
+ # @!method initialize(answer:, question:)
286
+ # @param answer [String]
287
+ # @param question [String]
288
+ end
289
+
290
+ # How the first sentence should be handled. "generated" means the LLM will
291
+ # generate a response based on the first_sentence instruction. "static" means the
292
+ # first_sentence will be spoken exactly as provided. "none" means the agent will
293
+ # not speak first and will wait for the user.
294
+ module FirstSentenceMode
295
+ extend Revox::Internal::Type::Enum
296
+
297
+ GENERATED = :generated
298
+ STATIC = :static
299
+ NONE = :none
300
+
301
+ # @!method self.values
302
+ # @return [Array<Symbol>]
303
+ end
304
+
305
+ module LlmModel
306
+ extend Revox::Internal::Type::Union
307
+
308
+ variant -> { Revox::AssistantCreateParams::LlmModel::UnionMember0 }
309
+
310
+ variant -> { Revox::AssistantCreateParams::LlmModel::UnionMember1 }
311
+
312
+ class UnionMember0 < Revox::Internal::Type::BaseModel
313
+ # @!attribute name
314
+ #
315
+ # @return [Symbol, Revox::Models::AssistantCreateParams::LlmModel::UnionMember0::Name]
316
+ required :name, enum: -> { Revox::AssistantCreateParams::LlmModel::UnionMember0::Name }
317
+
318
+ # @!attribute type
319
+ #
320
+ # @return [Symbol, :"dedicated-instance"]
321
+ required :type, const: :"dedicated-instance"
322
+
323
+ # @!method initialize(name:, type: :"dedicated-instance")
324
+ # @param name [Symbol, Revox::Models::AssistantCreateParams::LlmModel::UnionMember0::Name]
325
+ # @param type [Symbol, :"dedicated-instance"]
326
+
327
+ # @see Revox::Models::AssistantCreateParams::LlmModel::UnionMember0#name
328
+ module Name
329
+ extend Revox::Internal::Type::Enum
330
+
331
+ GPT_4_1 = :"gpt-4.1"
332
+ MINISTRAL_3_8B_INSTRUCT = :"ministral-3-8b-instruct"
333
+
334
+ # @!method self.values
335
+ # @return [Array<Symbol>]
336
+ end
337
+ end
338
+
339
+ class UnionMember1 < Revox::Internal::Type::BaseModel
340
+ # @!attribute openrouter_model_id
341
+ # The model ID to use from OpenRouter. eg: openai/gpt-4.1
342
+ #
343
+ # @return [String]
344
+ required :openrouter_model_id, String
345
+
346
+ # @!attribute openrouter_provider
347
+ # The provider to use from OpenRouter. eg: nebius, openai, azure, etc.
348
+ #
349
+ # @return [String]
350
+ required :openrouter_provider, String
351
+
352
+ # @!attribute type
353
+ # Use a model from OpenRouter.
354
+ #
355
+ # @return [Symbol, :openrouter]
356
+ required :type, const: :openrouter
357
+
358
+ # @!method initialize(openrouter_model_id:, openrouter_provider:, type: :openrouter)
359
+ # @param openrouter_model_id [String] The model ID to use from OpenRouter. eg: openai/gpt-4.1
360
+ #
361
+ # @param openrouter_provider [String] The provider to use from OpenRouter. eg: nebius, openai, azure, etc.
362
+ #
363
+ # @param type [Symbol, :openrouter] Use a model from OpenRouter.
364
+ end
365
+
366
+ # @!method self.variants
367
+ # @return [Array(Revox::Models::AssistantCreateParams::LlmModel::UnionMember0, Revox::Models::AssistantCreateParams::LlmModel::UnionMember1)]
368
+ end
369
+
370
+ class StructuredOutputConfig < Revox::Internal::Type::BaseModel
371
+ # @!attribute name
372
+ #
373
+ # @return [String]
374
+ required :name, String
375
+
376
+ # @!attribute required
377
+ #
378
+ # @return [Boolean]
379
+ required :required, Revox::Internal::Type::Boolean
380
+
381
+ # @!attribute type
382
+ #
383
+ # @return [Symbol, Revox::Models::AssistantCreateParams::StructuredOutputConfig::Type]
384
+ required :type, enum: -> { Revox::AssistantCreateParams::StructuredOutputConfig::Type }
385
+
386
+ # @!attribute description
387
+ #
388
+ # @return [String, nil]
389
+ optional :description, String
390
+
391
+ # @!attribute enum_options
392
+ #
393
+ # @return [Array<String>, nil]
394
+ optional :enum_options, Revox::Internal::Type::ArrayOf[String]
395
+
396
+ # @!method initialize(name:, required:, type:, description: nil, enum_options: nil)
397
+ # @param name [String]
398
+ # @param required [Boolean]
399
+ # @param type [Symbol, Revox::Models::AssistantCreateParams::StructuredOutputConfig::Type]
400
+ # @param description [String]
401
+ # @param enum_options [Array<String>]
402
+
403
+ # @see Revox::Models::AssistantCreateParams::StructuredOutputConfig#type
404
+ module Type
405
+ extend Revox::Internal::Type::Enum
406
+
407
+ STRING = :string
408
+ NUMBER = :number
409
+ BOOLEAN = :boolean
410
+ ENUM = :enum
411
+ DATE = :date
412
+ DATETIME = :datetime
413
+
414
+ # @!method self.values
415
+ # @return [Array<Symbol>]
416
+ end
417
+ end
418
+
419
+ class Voice < Revox::Internal::Type::BaseModel
420
+ # @!attribute id
421
+ # The ID of the voice.
422
+ #
423
+ # @return [String]
424
+ required :id, String
425
+
426
+ # @!attribute provider
427
+ # The provider of the voice.
428
+ #
429
+ # @return [Symbol, Revox::Models::AssistantCreateParams::Voice::Provider]
430
+ required :provider, enum: -> { Revox::AssistantCreateParams::Voice::Provider }
431
+
432
+ # @!attribute speed
433
+ # The speed of the voice. Range depends on provider: Cartesia 0.6–1.5, ElevenLabs
434
+ # 0.7–1.2. Default is 1.0.
435
+ #
436
+ # @return [Float, nil]
437
+ optional :speed, Float
438
+
439
+ # @!method initialize(id:, provider:, speed: nil)
440
+ # Some parameter documentations has been truncated, see
441
+ # {Revox::Models::AssistantCreateParams::Voice} for more details.
442
+ #
443
+ # The voice to use for the call. You can get the list of voices using the /voices
444
+ # endpoint
445
+ #
446
+ # @param id [String] The ID of the voice.
447
+ #
448
+ # @param provider [Symbol, Revox::Models::AssistantCreateParams::Voice::Provider] The provider of the voice.
449
+ #
450
+ # @param speed [Float] The speed of the voice. Range depends on provider: Cartesia 0.6–1.5, ElevenLabs
451
+
452
+ # The provider of the voice.
453
+ #
454
+ # @see Revox::Models::AssistantCreateParams::Voice#provider
455
+ module Provider
456
+ extend Revox::Internal::Type::Enum
457
+
458
+ CARTESIA = :cartesia
459
+ ELEVENLABS = :elevenlabs
460
+
461
+ # @!method self.values
462
+ # @return [Array<Symbol>]
463
+ end
464
+ end
465
+ end
466
+ end
467
+ end