revox 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +36 -0
  3. data/README.md +38 -38
  4. data/lib/revox/client.rb +8 -0
  5. data/lib/revox/internal/type/base_model.rb +3 -3
  6. data/lib/revox/models/assistant_clone_params.rb +20 -0
  7. data/lib/revox/models/assistant_clone_response.rb +1616 -0
  8. data/lib/revox/models/assistant_create_params.rb +90 -66
  9. data/lib/revox/models/assistant_create_response.rb +87 -65
  10. data/lib/revox/models/assistant_list_response.rb +87 -65
  11. data/lib/revox/models/assistant_retrieve_response.rb +86 -65
  12. data/lib/revox/models/assistant_update_params.rb +90 -66
  13. data/lib/revox/models/assistant_update_response.rb +87 -65
  14. data/lib/revox/models/auth_status_retrieve_params.rb +14 -0
  15. data/lib/revox/models/auth_status_retrieve_response.rb +17 -0
  16. data/lib/revox/models/call_cancel_params.rb +20 -0
  17. data/lib/revox/models/call_cancel_response.rb +16 -0
  18. data/lib/revox/models/call_create_params.rb +117 -90
  19. data/lib/revox/models/call_create_response.rb +680 -90
  20. data/lib/revox/models/call_export_params.rb +203 -0
  21. data/lib/revox/models/call_export_response.rb +22 -0
  22. data/lib/revox/models/call_pause_params.rb +20 -0
  23. data/lib/revox/models/call_pause_response.rb +16 -0
  24. data/lib/revox/models/call_phone_history_params.rb +14 -0
  25. data/lib/revox/models/call_phone_history_response.rb +95 -0
  26. data/lib/revox/models/call_resume_params.rb +20 -0
  27. data/lib/revox/models/call_resume_response.rb +16 -0
  28. data/lib/revox/models/call_retrieve_response.rb +681 -90
  29. data/lib/revox/models/call_search_params.rb +169 -0
  30. data/lib/revox/models/call_search_response.rb +3694 -0
  31. data/lib/revox/models/campaign_create_params.rb +7 -57
  32. data/lib/revox/models/campaign_create_response.rb +108 -119
  33. data/lib/revox/models/campaign_get_rows_response.rb +682 -90
  34. data/lib/revox/models/campaign_list_response.rb +108 -119
  35. data/lib/revox/models/campaign_pause_params.rb +20 -0
  36. data/lib/revox/models/campaign_pause_response.rb +16 -0
  37. data/lib/revox/models/campaign_resume_params.rb +20 -0
  38. data/lib/revox/models/campaign_resume_response.rb +16 -0
  39. data/lib/revox/models/campaign_retrieve_response.rb +108 -119
  40. data/lib/revox/models/campaign_statistics_params.rb +20 -0
  41. data/lib/revox/models/campaign_statistics_response.rb +514 -0
  42. data/lib/revox/models/campaign_update_params.rb +165 -0
  43. data/lib/revox/models/campaign_update_response.rb +2019 -0
  44. data/lib/revox/models/phone_number_delete_params.rb +20 -0
  45. data/lib/revox/models/phone_number_delete_response.rb +16 -0
  46. data/lib/revox/models/phone_number_list_params.rb +14 -0
  47. data/lib/revox/models/phone_number_list_response.rb +1799 -0
  48. data/lib/revox/models/phone_number_update_params.rb +32 -0
  49. data/lib/revox/models/phone_number_update_response.rb +1799 -0
  50. data/lib/revox/models/user_retrieve_params.rb +14 -0
  51. data/lib/revox/models/user_retrieve_response.rb +99 -0
  52. data/lib/revox/models/voice_clone_params.rb +78 -0
  53. data/lib/revox/models/voice_clone_response.rb +40 -0
  54. data/lib/revox/models/voice_delete_params.rb +20 -0
  55. data/lib/revox/models/voice_delete_response.rb +16 -0
  56. data/lib/revox/models/voice_list_response.rb +1 -0
  57. data/lib/revox/models/voice_preview_params.rb +1 -0
  58. data/lib/revox/models/voice_retrieve_params.rb +1 -0
  59. data/lib/revox/models.rb +35 -1
  60. data/lib/revox/resources/assistants.rb +31 -10
  61. data/lib/revox/resources/auth_status.rb +32 -0
  62. data/lib/revox/resources/call.rb +149 -4
  63. data/lib/revox/resources/campaigns.rb +110 -11
  64. data/lib/revox/resources/phone_numbers.rb +74 -0
  65. data/lib/revox/resources/users.rb +17 -3
  66. data/lib/revox/resources/voices.rb +50 -0
  67. data/lib/revox/version.rb +1 -1
  68. data/lib/revox.rb +38 -5
  69. data/rbi/revox/client.rbi +6 -0
  70. data/rbi/revox/models/assistant_clone_params.rbi +33 -0
  71. data/rbi/revox/models/assistant_clone_response.rbi +3351 -0
  72. data/rbi/revox/models/assistant_create_params.rbi +148 -162
  73. data/rbi/revox/models/assistant_create_response.rbi +157 -147
  74. data/rbi/revox/models/assistant_list_response.rbi +157 -147
  75. data/rbi/revox/models/assistant_retrieve_response.rbi +153 -147
  76. data/rbi/revox/models/assistant_update_params.rbi +148 -162
  77. data/rbi/revox/models/assistant_update_response.rbi +157 -147
  78. data/rbi/revox/models/auth_status_retrieve_params.rbi +27 -0
  79. data/rbi/revox/models/auth_status_retrieve_response.rbi +30 -0
  80. data/rbi/revox/models/call_cancel_params.rbi +33 -0
  81. data/rbi/revox/models/call_cancel_response.rbi +23 -0
  82. data/rbi/revox/models/call_create_params.rbi +190 -187
  83. data/rbi/revox/models/call_create_response.rbi +1150 -227
  84. data/rbi/revox/models/call_export_params.rbi +446 -0
  85. data/rbi/revox/models/call_export_response.rbi +26 -0
  86. data/rbi/revox/models/call_pause_params.rbi +31 -0
  87. data/rbi/revox/models/call_pause_response.rbi +23 -0
  88. data/rbi/revox/models/call_phone_history_params.rbi +27 -0
  89. data/rbi/revox/models/call_phone_history_response.rbi +209 -0
  90. data/rbi/revox/models/call_resume_params.rbi +33 -0
  91. data/rbi/revox/models/call_resume_response.rbi +23 -0
  92. data/rbi/revox/models/call_retrieve_response.rbi +1150 -227
  93. data/rbi/revox/models/call_search_params.rbi +281 -0
  94. data/rbi/revox/models/call_search_response.rbi +7504 -0
  95. data/rbi/revox/models/campaign_create_params.rbi +9 -87
  96. data/rbi/revox/models/campaign_create_response.rbi +188 -266
  97. data/rbi/revox/models/campaign_get_rows_response.rbi +1150 -225
  98. data/rbi/revox/models/campaign_list_response.rbi +188 -262
  99. data/rbi/revox/models/campaign_pause_params.rbi +33 -0
  100. data/rbi/revox/models/campaign_pause_response.rbi +23 -0
  101. data/rbi/revox/models/campaign_resume_params.rbi +33 -0
  102. data/rbi/revox/models/campaign_resume_response.rbi +23 -0
  103. data/rbi/revox/models/campaign_retrieve_response.rbi +188 -266
  104. data/rbi/revox/models/campaign_statistics_params.rbi +33 -0
  105. data/rbi/revox/models/campaign_statistics_response.rbi +1069 -0
  106. data/rbi/revox/models/campaign_update_params.rbi +313 -0
  107. data/rbi/revox/models/campaign_update_response.rbi +4092 -0
  108. data/rbi/revox/models/phone_number_delete_params.rbi +33 -0
  109. data/rbi/revox/models/phone_number_delete_response.rbi +26 -0
  110. data/rbi/revox/models/phone_number_list_params.rbi +27 -0
  111. data/rbi/revox/models/phone_number_list_response.rbi +3690 -0
  112. data/rbi/revox/models/phone_number_update_params.rbi +53 -0
  113. data/rbi/revox/models/phone_number_update_response.rbi +3693 -0
  114. data/rbi/revox/models/user_retrieve_params.rbi +27 -0
  115. data/rbi/revox/models/user_retrieve_response.rbi +140 -0
  116. data/rbi/revox/models/voice_clone_params.rbi +141 -0
  117. data/rbi/revox/models/voice_clone_response.rbi +53 -0
  118. data/rbi/revox/models/voice_delete_params.rbi +33 -0
  119. data/rbi/revox/models/voice_delete_response.rbi +23 -0
  120. data/rbi/revox/models/voice_list_response.rbi +5 -0
  121. data/rbi/revox/models/voice_preview_params.rbi +2 -0
  122. data/rbi/revox/models/voice_retrieve_params.rbi +2 -0
  123. data/rbi/revox/models.rbi +35 -1
  124. data/rbi/revox/resources/assistants.rbi +52 -22
  125. data/rbi/revox/resources/auth_status.rbi +21 -0
  126. data/rbi/revox/resources/call.rbi +114 -4
  127. data/rbi/revox/resources/campaigns.rbi +77 -15
  128. data/rbi/revox/resources/phone_numbers.rbi +43 -0
  129. data/rbi/revox/resources/users.rbi +8 -2
  130. data/rbi/revox/resources/voices.rbi +39 -0
  131. data/sig/revox/client.rbs +4 -0
  132. data/sig/revox/models/assistant_clone_params.rbs +20 -0
  133. data/sig/revox/models/assistant_clone_response.rbs +1310 -0
  134. data/sig/revox/models/assistant_create_params.rbs +39 -58
  135. data/sig/revox/models/assistant_create_response.rbs +46 -54
  136. data/sig/revox/models/assistant_list_response.rbs +46 -54
  137. data/sig/revox/models/assistant_retrieve_response.rbs +46 -54
  138. data/sig/revox/models/assistant_update_params.rbs +39 -58
  139. data/sig/revox/models/assistant_update_response.rbs +46 -54
  140. data/sig/revox/models/auth_status_retrieve_params.rbs +15 -0
  141. data/sig/revox/models/auth_status_retrieve_response.rbs +13 -0
  142. data/sig/revox/models/call_cancel_params.rbs +20 -0
  143. data/sig/revox/models/call_cancel_response.rbs +13 -0
  144. data/sig/revox/models/call_create_params.rbs +50 -71
  145. data/sig/revox/models/call_create_response.rbs +473 -77
  146. data/sig/revox/models/call_export_params.rbs +230 -0
  147. data/sig/revox/models/call_export_response.rbs +15 -0
  148. data/sig/revox/models/call_pause_params.rbs +20 -0
  149. data/sig/revox/models/call_pause_response.rbs +13 -0
  150. data/sig/revox/models/call_phone_history_params.rbs +15 -0
  151. data/sig/revox/models/call_phone_history_response.rbs +93 -0
  152. data/sig/revox/models/call_resume_params.rbs +20 -0
  153. data/sig/revox/models/call_resume_response.rbs +13 -0
  154. data/sig/revox/models/call_retrieve_response.rbs +473 -77
  155. data/sig/revox/models/call_search_params.rbs +194 -0
  156. data/sig/revox/models/call_search_response.rbs +3045 -0
  157. data/sig/revox/models/campaign_create_params.rbs +5 -50
  158. data/sig/revox/models/campaign_create_response.rbs +62 -98
  159. data/sig/revox/models/campaign_get_rows_response.rbs +472 -73
  160. data/sig/revox/models/campaign_list_response.rbs +62 -98
  161. data/sig/revox/models/campaign_pause_params.rbs +20 -0
  162. data/sig/revox/models/campaign_pause_response.rbs +13 -0
  163. data/sig/revox/models/campaign_resume_params.rbs +20 -0
  164. data/sig/revox/models/campaign_resume_response.rbs +13 -0
  165. data/sig/revox/models/campaign_retrieve_response.rbs +62 -98
  166. data/sig/revox/models/campaign_statistics_params.rbs +20 -0
  167. data/sig/revox/models/campaign_statistics_response.rbs +489 -0
  168. data/sig/revox/models/campaign_update_params.rbs +135 -0
  169. data/sig/revox/models/campaign_update_response.rbs +1658 -0
  170. data/sig/revox/models/phone_number_delete_params.rbs +20 -0
  171. data/sig/revox/models/phone_number_delete_response.rbs +13 -0
  172. data/sig/revox/models/phone_number_list_params.rbs +15 -0
  173. data/sig/revox/models/phone_number_list_response.rbs +1454 -0
  174. data/sig/revox/models/phone_number_update_params.rbs +32 -0
  175. data/sig/revox/models/phone_number_update_response.rbs +1452 -0
  176. data/sig/revox/models/user_retrieve_params.rbs +14 -0
  177. data/sig/revox/models/user_retrieve_response.rbs +71 -0
  178. data/sig/revox/models/voice_clone_params.rbs +79 -0
  179. data/sig/revox/models/voice_clone_response.rbs +40 -0
  180. data/sig/revox/models/voice_delete_params.rbs +20 -0
  181. data/sig/revox/models/voice_delete_response.rbs +13 -0
  182. data/sig/revox/models/voice_list_response.rbs +2 -1
  183. data/sig/revox/models/voice_preview_params.rbs +2 -1
  184. data/sig/revox/models/voice_retrieve_params.rbs +2 -1
  185. data/sig/revox/models.rbs +35 -1
  186. data/sig/revox/resources/assistants.rbs +9 -4
  187. data/sig/revox/resources/auth_status.rbs +11 -0
  188. data/sig/revox/resources/call.rbs +46 -1
  189. data/sig/revox/resources/campaigns.rbs +24 -3
  190. data/sig/revox/resources/phone_numbers.rbs +23 -0
  191. data/sig/revox/resources/users.rbs +3 -1
  192. data/sig/revox/resources/voices.rbs +13 -0
  193. metadata +116 -17
  194. data/lib/revox/models/users/me_retrieve_params.rb +0 -16
  195. data/lib/revox/models/users/me_retrieve_response.rb +0 -101
  196. data/lib/revox/models/users/me_update_params.rb +0 -22
  197. data/lib/revox/models/users/me_update_response.rb +0 -101
  198. data/lib/revox/resources/users/me.rb +0 -55
  199. data/rbi/revox/models/users/me_retrieve_params.rbi +0 -29
  200. data/rbi/revox/models/users/me_retrieve_response.rbi +0 -149
  201. data/rbi/revox/models/users/me_update_params.rbi +0 -43
  202. data/rbi/revox/models/users/me_update_response.rbi +0 -149
  203. data/rbi/revox/resources/users/me.rbi +0 -33
  204. data/sig/revox/models/users/me_retrieve_params.rbs +0 -16
  205. data/sig/revox/models/users/me_retrieve_response.rbs +0 -75
  206. data/sig/revox/models/users/me_update_params.rbs +0 -28
  207. data/sig/revox/models/users/me_update_response.rbs +0 -75
  208. data/sig/revox/resources/users/me.rbs +0 -18
@@ -0,0 +1,21 @@
1
+ # typed: strong
2
+
3
+ module Revox
4
+ module Resources
5
+ class AuthStatus
6
+ # Check if your API key is still valid.
7
+ sig do
8
+ params(request_options: Revox::RequestOptions::OrHash).returns(
9
+ Revox::Models::AuthStatusRetrieveResponse
10
+ )
11
+ end
12
+ def retrieve(request_options: {})
13
+ end
14
+
15
+ # @api private
16
+ sig { params(client: Revox::Client).returns(T.attached_class) }
17
+ def self.new(client:)
18
+ end
19
+ end
20
+ end
21
+ end
@@ -15,11 +15,11 @@ module Revox
15
15
  assistant: Revox::CallCreateParams::Assistant::OrHash,
16
16
  assistant_id: String,
17
17
  concurrency: Revox::CallCreateParams::Concurrency::OrHash,
18
- force_now: T::Boolean,
19
18
  from_phone_number: String,
20
19
  metadata: T::Hash[Symbol, String],
21
20
  prompt_variables: T::Hash[Symbol, String],
22
21
  scheduled_at: Revox::CallCreateParams::ScheduledAt::Variants,
22
+ skip_calling_window: T::Boolean,
23
23
  request_options: Revox::RequestOptions::OrHash
24
24
  ).returns(Revox::Models::CallCreateResponse)
25
25
  end
@@ -31,10 +31,10 @@ module Revox
31
31
  assistant: nil,
32
32
  # The ID of the assistant to use for this call.
33
33
  assistant_id: nil,
34
- # Limit the number of concurrent calls for a given concurrency key.
34
+ # Limit the number of concurrent calls for a given concurrency key. The limit
35
+ # itself is set server-side; omit this to leave the call ungrouped (bounded only
36
+ # by your organization's limit).
35
37
  concurrency: nil,
36
- # The prompt to use for the call. This will be given to the LLM (gpt-4.1)
37
- force_now: nil,
38
38
  # The phone number to use for making the call (e.g., +1234567890). If not
39
39
  # provided, uses the default trunk.
40
40
  from_phone_number: nil,
@@ -47,6 +47,9 @@ module Revox
47
47
  # Schedule the call to start at a specific date and time (ISO 8601 format). If not
48
48
  # provided, the call will start immediately.
49
49
  scheduled_at: nil,
50
+ # Bypass the calling-window check for this call so it dials even outside the
51
+ # assistant's configured window. Use for immediate 'call now' dials.
52
+ skip_calling_window: nil,
50
53
  request_options: {}
51
54
  )
52
55
  end
@@ -68,6 +71,113 @@ module Revox
68
71
  )
69
72
  end
70
73
 
74
+ # Cancel a running or scheduled call.
75
+ sig do
76
+ params(
77
+ id: String,
78
+ request_options: Revox::RequestOptions::OrHash
79
+ ).returns(Revox::Models::CallCancelResponse)
80
+ end
81
+ def cancel(id, request_options: {})
82
+ end
83
+
84
+ # Export a list of call attempts as a CSV file.
85
+ sig do
86
+ params(
87
+ filters: Revox::CallExportParams::Filters::OrHash,
88
+ include_metadata: T::Boolean,
89
+ include_structured_output_fields: T::Boolean,
90
+ request_options: Revox::RequestOptions::OrHash
91
+ ).returns(Revox::Models::CallExportResponse)
92
+ end
93
+ def export(
94
+ filters:,
95
+ # Whether to include the metadata in the CSV file. These are the fields you
96
+ # (optionally) attached when placing the call.
97
+ include_metadata: nil,
98
+ # Whether to include the structured output fields in the CSV file. These are
99
+ # generated by our AI agent during call analysis phase.
100
+ include_structured_output_fields: nil,
101
+ request_options: {}
102
+ )
103
+ end
104
+
105
+ # Pause a call's retry loop. The current in-progress attempt (if any) will finish,
106
+ # but no new attempts will be started until the call is resumed.
107
+ sig do
108
+ params(
109
+ id: String,
110
+ request_options: Revox::RequestOptions::OrHash
111
+ ).returns(Revox::Models::CallPauseResponse)
112
+ end
113
+ def pause(id, request_options: {})
114
+ end
115
+
116
+ # Returns a map of phone numbers to the number of calls and associated campaigns
117
+ # across the entire organization. Useful for detecting contacts that have already
118
+ # been reached.
119
+ sig do
120
+ params(request_options: Revox::RequestOptions::OrHash).returns(
121
+ Revox::Models::CallPhoneHistoryResponse
122
+ )
123
+ end
124
+ def phone_history(request_options: {})
125
+ end
126
+
127
+ # Resume a previously paused call. The retry loop will continue from where it left
128
+ # off.
129
+ sig do
130
+ params(
131
+ id: String,
132
+ request_options: Revox::RequestOptions::OrHash
133
+ ).returns(Revox::Models::CallResumeResponse)
134
+ end
135
+ def resume(id, request_options: {})
136
+ end
137
+
138
+ # Retrieve a paginated list of call attempts. Each entry includes the call status,
139
+ # phone number, assistant used, transcript, and timestamps. Use the page and
140
+ # page_size query parameters to navigate through results.
141
+ sig do
142
+ params(
143
+ assignee_ids: T::Array[String],
144
+ assistant_ids: T::Array[String],
145
+ campaign_ids: T::Array[String],
146
+ directions: T::Array[Revox::CallSearchParams::Direction::OrSymbol],
147
+ from_phone_numbers: T::Array[String],
148
+ outcomes: T::Array[Revox::CallSearchParams::Outcome::OrSymbol],
149
+ page: Integer,
150
+ page_size: Integer,
151
+ results: T::Array[Revox::CallSearchParams::Result::OrSymbol],
152
+ statuses: T::Array[Revox::CallSearchParams::Status::OrSymbol],
153
+ call_ids: T::Array[String],
154
+ query: String,
155
+ sort_by: String,
156
+ sort_direction: Revox::CallSearchParams::SortDirection::OrSymbol,
157
+ to_phone_number: String,
158
+ request_options: Revox::RequestOptions::OrHash
159
+ ).returns(Revox::Models::CallSearchResponse)
160
+ end
161
+ def search(
162
+ assignee_ids:,
163
+ assistant_ids:,
164
+ campaign_ids:,
165
+ directions:,
166
+ from_phone_numbers:,
167
+ outcomes:,
168
+ page:,
169
+ page_size:,
170
+ results:,
171
+ statuses:,
172
+ call_ids: nil,
173
+ query: nil,
174
+ sort_by: nil,
175
+ sort_direction: nil,
176
+ to_phone_number: nil,
177
+ request_options: {}
178
+ )
179
+ end
180
+
71
181
  # @api private
72
182
  sig { params(client: Revox::Client).returns(T.attached_class) }
73
183
  def self.new(client:)
@@ -3,20 +3,18 @@
3
3
  module Revox
4
4
  module Resources
5
5
  class Campaigns
6
- # Create a new outbound calling campaign. By default the campaign launches
7
- # immediately. Set launch to false to save as a draft for later review.
6
+ # Create a new outbound calling campaign. Every contact is materialized as a call
7
+ # in the `not_launched` status nothing is dialed. Use POST
8
+ # /campaigns/:id/launch-calls to send them.
8
9
  sig do
9
10
  params(
10
11
  assistant_id: String,
11
12
  contacts: T::Array[Revox::CampaignCreateParams::Contact::OrHash],
12
- launch: T::Boolean,
13
13
  name: String,
14
- type: Revox::CampaignCreateParams::Type::OrSymbol,
15
14
  call_retry_config:
16
15
  Revox::CampaignCreateParams::CallRetryConfig::OrHash,
17
16
  from_phone_number: String,
18
17
  max_concurrent_calls: Float,
19
- scheduled_at: Revox::CampaignCreateParams::ScheduledAt::Variants,
20
18
  request_options: Revox::RequestOptions::OrHash
21
19
  ).returns(Revox::Models::CampaignCreateResponse)
22
20
  end
@@ -25,13 +23,8 @@ module Revox
25
23
  assistant_id:,
26
24
  # The list of contacts to call
27
25
  contacts:,
28
- # Whether to launch the campaign immediately. Set to false to save as a draft.
29
- launch:,
30
26
  # The name of the campaign
31
27
  name:,
32
- # Campaign type. 'jump_in' campaigns only dial while someone is on the campaign
33
- # page and auto-pause when unattended.
34
- type:,
35
28
  # Override retry configuration for calls in this campaign. If not provided, uses
36
29
  # the assistant's retry config.
37
30
  call_retry_config: nil,
@@ -39,9 +32,6 @@ module Revox
39
32
  from_phone_number: nil,
40
33
  # Maximum number of concurrent calls allowed for this campaign
41
34
  max_concurrent_calls: nil,
42
- # Schedule all calls in this campaign to start at a specific date and time (ISO
43
- # 8601 format)
44
- scheduled_at: nil,
45
35
  request_options: {}
46
36
  )
47
37
  end
@@ -57,6 +47,38 @@ module Revox
57
47
  def retrieve(id, request_options: {})
58
48
  end
59
49
 
50
+ # Update a campaign's name, outbound number, retry configuration (calling hours,
51
+ # retry delay, max attempts) and concurrency cap. Changes are applied to the
52
+ # campaign's calls that have not completed yet. The assistant is fixed at
53
+ # creation; add contacts with POST /campaigns/:id/rows, and choose when calls go
54
+ # out with POST /campaigns/:id/launch-calls.
55
+ sig do
56
+ params(
57
+ id: String,
58
+ call_retry_config:
59
+ T.nilable(Revox::CampaignUpdateParams::CallRetryConfig::OrHash),
60
+ from_phone_number: T.nilable(String),
61
+ max_concurrent_calls: T.nilable(Float),
62
+ name: String,
63
+ request_options: Revox::RequestOptions::OrHash
64
+ ).returns(Revox::Models::CampaignUpdateResponse)
65
+ end
66
+ def update(
67
+ id,
68
+ # Configuration for call retry behavior including time windows, delays, and max
69
+ # iterations. If not provided, defaults will be used.
70
+ call_retry_config: nil,
71
+ # The phone number to use for outbound calls. Editable after launch; applied to
72
+ # the campaign's calls that have not completed yet.
73
+ from_phone_number: nil,
74
+ # Maximum concurrent calls. Editable after launch.
75
+ max_concurrent_calls: nil,
76
+ # Campaign display name
77
+ name: nil,
78
+ request_options: {}
79
+ )
80
+ end
81
+
60
82
  # Retrieve all campaigns for your organization, including both active and
61
83
  # completed ones.
62
84
  sig do
@@ -101,8 +123,7 @@ module Revox
101
123
  def export_rows(id, request_options: {})
102
124
  end
103
125
 
104
- # Retrieve all contact rows for a campaign. Useful for loading draft campaign data
105
- # for editing.
126
+ # Retrieve all contact rows for a campaign.
106
127
  sig do
107
128
  params(
108
129
  id: String,
@@ -112,6 +133,47 @@ module Revox
112
133
  def get_rows(id, request_options: {})
113
134
  end
114
135
 
136
+ # Pause a running campaign so no further calls are placed. In-progress calls are
137
+ # allowed to finish; pending and scheduled calls are held until the campaign is
138
+ # resumed. Scheduled retry timers keep counting down, so a call resumed before its
139
+ # time fires on schedule, while one resumed after its time fires at the next
140
+ # available calling window.
141
+ sig do
142
+ params(
143
+ id: String,
144
+ request_options: Revox::RequestOptions::OrHash
145
+ ).returns(Revox::Models::CampaignPauseResponse)
146
+ end
147
+ def pause(id, request_options: {})
148
+ end
149
+
150
+ # Resume a paused campaign. Held calls continue from where they left off; calls
151
+ # whose scheduled time passed during the pause are placed at the next available
152
+ # calling window.
153
+ sig do
154
+ params(
155
+ id: String,
156
+ request_options: Revox::RequestOptions::OrHash
157
+ ).returns(Revox::Models::CampaignResumeResponse)
158
+ end
159
+ def resume(id, request_options: {})
160
+ end
161
+
162
+ # Retrieve the "Statistiques" report for a campaign: the four-tile cascade funnel
163
+ # (appelés → eus en ligne → réels échanges → leads chauds), two secondary tiles,
164
+ # the distribution of exchanges by outcome, the list of hot leads, and
165
+ # data-extraction coverage. All counts are over distinct E.164-normalized phone
166
+ # numbers, and the outcome-based categories derive exclusively from calls.outcome.
167
+ # Cascade percentages are null when their denominator is zero.
168
+ sig do
169
+ params(
170
+ id: String,
171
+ request_options: Revox::RequestOptions::OrHash
172
+ ).returns(Revox::Models::CampaignStatisticsResponse)
173
+ end
174
+ def statistics(id, request_options: {})
175
+ end
176
+
115
177
  # @api private
116
178
  sig { params(client: Revox::Client).returns(T.attached_class) }
117
179
  def self.new(client:)
@@ -0,0 +1,43 @@
1
+ # typed: strong
2
+
3
+ module Revox
4
+ module Resources
5
+ class PhoneNumbers
6
+ # Update a phone number
7
+ sig do
8
+ params(
9
+ id: String,
10
+ inbound_assistant_id: T.nilable(String),
11
+ label: T.nilable(String),
12
+ request_options: Revox::RequestOptions::OrHash
13
+ ).returns(Revox::Models::PhoneNumberUpdateResponse)
14
+ end
15
+ def update(id, inbound_assistant_id: nil, label: nil, request_options: {})
16
+ end
17
+
18
+ # Get phone numbers
19
+ sig do
20
+ params(request_options: Revox::RequestOptions::OrHash).returns(
21
+ Revox::Models::PhoneNumberListResponse
22
+ )
23
+ end
24
+ def list(request_options: {})
25
+ end
26
+
27
+ # Delete a phone number
28
+ sig do
29
+ params(
30
+ id: String,
31
+ request_options: Revox::RequestOptions::OrHash
32
+ ).returns(Revox::Models::PhoneNumberDeleteResponse)
33
+ end
34
+ def delete(id, request_options: {})
35
+ end
36
+
37
+ # @api private
38
+ sig { params(client: Revox::Client).returns(T.attached_class) }
39
+ def self.new(client:)
40
+ end
41
+ end
42
+ end
43
+ end
@@ -3,8 +3,14 @@
3
3
  module Revox
4
4
  module Resources
5
5
  class Users
6
- sig { returns(Revox::Resources::Users::Me) }
7
- attr_reader :me
6
+ # Get the current authenticated user.
7
+ sig do
8
+ params(request_options: Revox::RequestOptions::OrHash).returns(
9
+ Revox::Models::UserRetrieveResponse
10
+ )
11
+ end
12
+ def retrieve(request_options: {})
13
+ end
8
14
 
9
15
  # @api private
10
16
  sig { params(client: Revox::Client).returns(T.attached_class) }
@@ -29,6 +29,45 @@ module Revox
29
29
  def list(request_options: {})
30
30
  end
31
31
 
32
+ # Delete a cloned voice. Only cloned voices can be deleted. Returns 409 if the
33
+ # voice is in use by an assistant.
34
+ sig do
35
+ params(
36
+ id: String,
37
+ request_options: Revox::RequestOptions::OrHash
38
+ ).returns(Revox::Models::VoiceDeleteResponse)
39
+ end
40
+ def delete(
41
+ # The cloned voice ID to delete.
42
+ id,
43
+ request_options: {}
44
+ )
45
+ end
46
+
47
+ # Clone a voice from an audio recording. Send audio as a base64-encoded string.
48
+ # The cloned voice will be available in GET /voices.
49
+ sig do
50
+ params(
51
+ audio: String,
52
+ content_type: Revox::VoiceCloneParams::ContentType::OrSymbol,
53
+ language: Revox::VoiceCloneParams::Language::OrSymbol,
54
+ name: String,
55
+ request_options: Revox::RequestOptions::OrHash
56
+ ).returns(Revox::Models::VoiceCloneResponse)
57
+ end
58
+ def clone_(
59
+ # Base64-encoded audio data (max ~7.5MB decoded)
60
+ audio:,
61
+ # MIME type of the audio
62
+ content_type:,
63
+ # Language of the voice
64
+ language:,
65
+ # Name for the cloned voice
66
+ name:,
67
+ request_options: {}
68
+ )
69
+ end
70
+
32
71
  # Generate a short audio preview for a given voice.
33
72
  sig do
34
73
  params(
data/sig/revox/client.rbs CHANGED
@@ -10,8 +10,12 @@ module Revox
10
10
 
11
11
  attr_reader api_key: String
12
12
 
13
+ attr_reader auth_status: Revox::Resources::AuthStatus
14
+
13
15
  attr_reader campaigns: Revox::Resources::Campaigns
14
16
 
17
+ attr_reader phone_numbers: Revox::Resources::PhoneNumbers
18
+
15
19
  attr_reader assistants: Revox::Resources::Assistants
16
20
 
17
21
  attr_reader call: Revox::Resources::Call
@@ -0,0 +1,20 @@
1
+ module Revox
2
+ module Models
3
+ type assistant_clone_params =
4
+ { id: String } & Revox::Internal::Type::request_parameters
5
+
6
+ class AssistantCloneParams < Revox::Internal::Type::BaseModel
7
+ extend Revox::Internal::Type::RequestParameters::Converter
8
+ include Revox::Internal::Type::RequestParameters
9
+
10
+ attr_accessor id: String
11
+
12
+ def initialize: (
13
+ id: String,
14
+ ?request_options: Revox::request_opts
15
+ ) -> void
16
+
17
+ def to_hash: -> { id: String, request_options: Revox::RequestOptions }
18
+ end
19
+ end
20
+ end