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,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Revox
4
+ module Models
5
+ # @see Revox::Resources::Users#retrieve
6
+ class UserRetrieveParams < Revox::Internal::Type::BaseModel
7
+ extend Revox::Internal::Type::RequestParameters::Converter
8
+ include Revox::Internal::Type::RequestParameters
9
+
10
+ # @!method initialize(request_options: {})
11
+ # @param request_options [Revox::RequestOptions, Hash{Symbol=>Object}]
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,99 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Revox
4
+ module Models
5
+ # @see Revox::Resources::Users#retrieve
6
+ class UserRetrieveResponse < Revox::Internal::Type::BaseModel
7
+ # @!attribute user
8
+ # The current authenticated user.
9
+ #
10
+ # @return [Revox::Models::UserRetrieveResponse::User]
11
+ required :user, -> { Revox::Models::UserRetrieveResponse::User }
12
+
13
+ # @!method initialize(user:)
14
+ # @param user [Revox::Models::UserRetrieveResponse::User] The current authenticated user.
15
+
16
+ # @see Revox::Models::UserRetrieveResponse#user
17
+ class User < Revox::Internal::Type::BaseModel
18
+ # @!attribute id
19
+ # The unique identifier of the user.
20
+ #
21
+ # @return [String]
22
+ required :id, String
23
+
24
+ # @!attribute created_at
25
+ # The time the user was created.
26
+ #
27
+ # @return [Object]
28
+ required :created_at, Revox::Internal::Type::Unknown
29
+
30
+ # @!attribute email
31
+ # The email address of the user.
32
+ #
33
+ # @return [String]
34
+ required :email, String
35
+
36
+ # @!attribute first_name
37
+ # The first name of the user.
38
+ #
39
+ # @return [String, nil]
40
+ required :first_name, String, nil?: true
41
+
42
+ # @!attribute has_completed_onboarding
43
+ # Whether the user has completed the onboarding tutorial.
44
+ #
45
+ # @return [Boolean]
46
+ required :has_completed_onboarding, Revox::Internal::Type::Boolean
47
+
48
+ # @!attribute last_name
49
+ # The last name of the user.
50
+ #
51
+ # @return [String, nil]
52
+ required :last_name, String, nil?: true
53
+
54
+ # @!attribute organization_id
55
+ # The ID of the organization the user belongs to.
56
+ #
57
+ # @return [String]
58
+ required :organization_id, String
59
+
60
+ # @!attribute updated_at
61
+ # The time the user was last updated.
62
+ #
63
+ # @return [Object]
64
+ required :updated_at, Revox::Internal::Type::Unknown
65
+
66
+ # @!attribute organization_country
67
+ # ISO 3166-1 alpha-2 country code of the organization (e.g. FR). Used as the
68
+ # default region when normalizing national-format phone numbers.
69
+ #
70
+ # @return [String, nil]
71
+ optional :organization_country, String, nil?: true
72
+
73
+ # @!method initialize(id:, created_at:, email:, first_name:, has_completed_onboarding:, last_name:, organization_id:, updated_at:, organization_country: nil)
74
+ # Some parameter documentations has been truncated, see
75
+ # {Revox::Models::UserRetrieveResponse::User} for more details.
76
+ #
77
+ # The current authenticated user.
78
+ #
79
+ # @param id [String] The unique identifier of the user.
80
+ #
81
+ # @param created_at [Object] The time the user was created.
82
+ #
83
+ # @param email [String] The email address of the user.
84
+ #
85
+ # @param first_name [String, nil] The first name of the user.
86
+ #
87
+ # @param has_completed_onboarding [Boolean] Whether the user has completed the onboarding tutorial.
88
+ #
89
+ # @param last_name [String, nil] The last name of the user.
90
+ #
91
+ # @param organization_id [String] The ID of the organization the user belongs to.
92
+ #
93
+ # @param updated_at [Object] The time the user was last updated.
94
+ #
95
+ # @param organization_country [String, nil] ISO 3166-1 alpha-2 country code of the organization (e.g. FR). Used as the defau
96
+ end
97
+ end
98
+ end
99
+ end
@@ -0,0 +1,78 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Revox
4
+ module Models
5
+ # @see Revox::Resources::Voices#clone_
6
+ class VoiceCloneParams < Revox::Internal::Type::BaseModel
7
+ extend Revox::Internal::Type::RequestParameters::Converter
8
+ include Revox::Internal::Type::RequestParameters
9
+
10
+ # @!attribute audio
11
+ # Base64-encoded audio data (max ~7.5MB decoded)
12
+ #
13
+ # @return [String]
14
+ required :audio, String
15
+
16
+ # @!attribute content_type
17
+ # MIME type of the audio
18
+ #
19
+ # @return [Symbol, Revox::Models::VoiceCloneParams::ContentType]
20
+ required :content_type, enum: -> { Revox::VoiceCloneParams::ContentType }, api_name: :contentType
21
+
22
+ # @!attribute language
23
+ # Language of the voice
24
+ #
25
+ # @return [Symbol, Revox::Models::VoiceCloneParams::Language]
26
+ required :language, enum: -> { Revox::VoiceCloneParams::Language }
27
+
28
+ # @!attribute name
29
+ # Name for the cloned voice
30
+ #
31
+ # @return [String]
32
+ required :name, String
33
+
34
+ # @!method initialize(audio:, content_type:, language:, name:, request_options: {})
35
+ # @param audio [String] Base64-encoded audio data (max ~7.5MB decoded)
36
+ #
37
+ # @param content_type [Symbol, Revox::Models::VoiceCloneParams::ContentType] MIME type of the audio
38
+ #
39
+ # @param language [Symbol, Revox::Models::VoiceCloneParams::Language] Language of the voice
40
+ #
41
+ # @param name [String] Name for the cloned voice
42
+ #
43
+ # @param request_options [Revox::RequestOptions, Hash{Symbol=>Object}]
44
+
45
+ # MIME type of the audio
46
+ module ContentType
47
+ extend Revox::Internal::Type::Enum
48
+
49
+ AUDIO_WEBM = :"audio/webm"
50
+ AUDIO_WAV = :"audio/wav"
51
+ AUDIO_MPEG = :"audio/mpeg"
52
+ AUDIO_OGG = :"audio/ogg"
53
+ AUDIO_MP4 = :"audio/mp4"
54
+ VIDEO_WEBM = :"video/webm"
55
+
56
+ # @!method self.values
57
+ # @return [Array<Symbol>]
58
+ end
59
+
60
+ # Language of the voice
61
+ module Language
62
+ extend Revox::Internal::Type::Enum
63
+
64
+ EN = :en
65
+ FR = :fr
66
+ ES = :es
67
+ DE = :de
68
+ IT = :it
69
+ PT = :pt
70
+ RU = :ru
71
+ ZH = :zh
72
+
73
+ # @!method self.values
74
+ # @return [Array<Symbol>]
75
+ end
76
+ end
77
+ end
78
+ end
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Revox
4
+ module Models
5
+ # @see Revox::Resources::Voices#clone_
6
+ class VoiceCloneResponse < Revox::Internal::Type::BaseModel
7
+ # @!attribute id
8
+ #
9
+ # @return [String]
10
+ required :id, String
11
+
12
+ # @!attribute cartesia_voice_id
13
+ #
14
+ # @return [String]
15
+ required :cartesia_voice_id, String, api_name: :cartesiaVoiceId
16
+
17
+ # @!attribute created_at
18
+ #
19
+ # @return [String]
20
+ required :created_at, String, api_name: :createdAt
21
+
22
+ # @!attribute language
23
+ #
24
+ # @return [String]
25
+ required :language, String
26
+
27
+ # @!attribute name
28
+ #
29
+ # @return [String]
30
+ required :name, String
31
+
32
+ # @!method initialize(id:, cartesia_voice_id:, created_at:, language:, name:)
33
+ # @param id [String]
34
+ # @param cartesia_voice_id [String]
35
+ # @param created_at [String]
36
+ # @param language [String]
37
+ # @param name [String]
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Revox
4
+ module Models
5
+ # @see Revox::Resources::Voices#delete
6
+ class VoiceDeleteParams < Revox::Internal::Type::BaseModel
7
+ extend Revox::Internal::Type::RequestParameters::Converter
8
+ include Revox::Internal::Type::RequestParameters
9
+
10
+ # @!attribute id
11
+ #
12
+ # @return [String]
13
+ required :id, String
14
+
15
+ # @!method initialize(id:, request_options: {})
16
+ # @param id [String]
17
+ # @param request_options [Revox::RequestOptions, Hash{Symbol=>Object}]
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Revox
4
+ module Models
5
+ # @see Revox::Resources::Voices#delete
6
+ class VoiceDeleteResponse < Revox::Internal::Type::BaseModel
7
+ # @!attribute success
8
+ #
9
+ # @return [Boolean]
10
+ required :success, Revox::Internal::Type::Boolean
11
+
12
+ # @!method initialize(success:)
13
+ # @param success [Boolean]
14
+ end
15
+ end
16
+ end
@@ -120,6 +120,7 @@ module Revox
120
120
 
121
121
  CARTESIA = :cartesia
122
122
  ELEVENLABS = :elevenlabs
123
+ GRADIUM = :gradium
123
124
 
124
125
  # @!method self.values
125
126
  # @return [Array<Symbol>]
@@ -68,6 +68,7 @@ module Revox
68
68
 
69
69
  CARTESIA = :cartesia
70
70
  ELEVENLABS = :elevenlabs
71
+ GRADIUM = :gradium
71
72
 
72
73
  # @!method self.values
73
74
  # @return [Array<Symbol>]
@@ -27,6 +27,7 @@ module Revox
27
27
 
28
28
  CARTESIA = :cartesia
29
29
  ELEVENLABS = :elevenlabs
30
+ GRADIUM = :gradium
30
31
 
31
32
  # @!method self.values
32
33
  # @return [Array<Symbol>]
data/lib/revox/models.rb CHANGED
@@ -39,6 +39,8 @@ module Revox
39
39
  mod.define_sorbet_constant!(const) { T.type_alias { mod.to_sorbet_type } }
40
40
  end
41
41
 
42
+ AssistantCloneParams = Revox::Models::AssistantCloneParams
43
+
42
44
  AssistantCreateParams = Revox::Models::AssistantCreateParams
43
45
 
44
46
  AssistantDeleteParams = Revox::Models::AssistantDeleteParams
@@ -49,10 +51,24 @@ module Revox
49
51
 
50
52
  AssistantUpdateParams = Revox::Models::AssistantUpdateParams
51
53
 
54
+ AuthStatusRetrieveParams = Revox::Models::AuthStatusRetrieveParams
55
+
56
+ CallCancelParams = Revox::Models::CallCancelParams
57
+
52
58
  CallCreateParams = Revox::Models::CallCreateParams
53
59
 
60
+ CallExportParams = Revox::Models::CallExportParams
61
+
62
+ CallPauseParams = Revox::Models::CallPauseParams
63
+
64
+ CallPhoneHistoryParams = Revox::Models::CallPhoneHistoryParams
65
+
66
+ CallResumeParams = Revox::Models::CallResumeParams
67
+
54
68
  CallRetrieveParams = Revox::Models::CallRetrieveParams
55
69
 
70
+ CallSearchParams = Revox::Models::CallSearchParams
71
+
56
72
  CampaignCancelParams = Revox::Models::CampaignCancelParams
57
73
 
58
74
  CampaignCreateParams = Revox::Models::CampaignCreateParams
@@ -65,9 +81,27 @@ module Revox
65
81
 
66
82
  CampaignListParams = Revox::Models::CampaignListParams
67
83
 
84
+ CampaignPauseParams = Revox::Models::CampaignPauseParams
85
+
86
+ CampaignResumeParams = Revox::Models::CampaignResumeParams
87
+
68
88
  CampaignRetrieveParams = Revox::Models::CampaignRetrieveParams
69
89
 
70
- Users = Revox::Models::Users
90
+ CampaignStatisticsParams = Revox::Models::CampaignStatisticsParams
91
+
92
+ CampaignUpdateParams = Revox::Models::CampaignUpdateParams
93
+
94
+ PhoneNumberDeleteParams = Revox::Models::PhoneNumberDeleteParams
95
+
96
+ PhoneNumberListParams = Revox::Models::PhoneNumberListParams
97
+
98
+ PhoneNumberUpdateParams = Revox::Models::PhoneNumberUpdateParams
99
+
100
+ UserRetrieveParams = Revox::Models::UserRetrieveParams
101
+
102
+ VoiceCloneParams = Revox::Models::VoiceCloneParams
103
+
104
+ VoiceDeleteParams = Revox::Models::VoiceDeleteParams
71
105
 
72
106
  VoiceListParams = Revox::Models::VoiceListParams
73
107
 
@@ -12,7 +12,7 @@ module Revox
12
12
  # voice provider and voice ID (Cartesia or ElevenLabs), and end-of-call behavior.
13
13
  # Once created, reference the assistant by its ID when placing calls.
14
14
  #
15
- # @overload create(name:, prompt:, after_call_sms_outcomes: nil, after_call_sms_prompt: nil, background_sound: nil, background_sound_volume: nil, calendly: nil, call_retry_config: nil, cartesia_dictionary_pronunciation_id: nil, custom_tools: nil, email_notification_address: nil, email_notification_language: nil, email_notification_outcomes: nil, end_of_call_sentence: nil, faq_items: nil, first_sentence: nil, first_sentence_delay_ms: nil, first_sentence_mode: nil, from_phone_number: nil, human_transfer_mode: nil, ivr_navigation_enabled: nil, llm_model: nil, logo_url: nil, max_call_duration_secs: nil, max_duration_end_message: nil, position: nil, prompt_flow: nil, slack: nil, sms_enabled: nil, sms_template: nil, structured_output_config: nil, structured_output_prompt: nil, stt_context: nil, stt_model: nil, thinking_sound: nil, thinking_sound_probability: nil, thinking_sound_volume: nil, transfer_phone_number: nil, type: nil, voice: nil, voicemail_message: nil, voicemail_sms_prompt: nil, warm_transfer_summary_instructions: nil, webhook_url: nil, zoho: nil, request_options: {})
15
+ # @overload create(name:, prompt:, after_call_sms_outcomes: nil, after_call_sms_prompt: nil, background_sound: nil, background_sound_volume: nil, calendly: nil, call_retry_config: nil, cartesia_dictionary_pronunciation_id: nil, custom_tools: nil, email_notification_address: nil, email_notification_outcomes: nil, end_of_call_sentence: nil, faq_items: nil, first_sentence: nil, first_sentence_delay_ms: nil, first_sentence_mode: nil, from_phone_number: nil, human_transfer_mode: nil, ivr_navigation_enabled: nil, llm_model: nil, logo_url: nil, max_call_duration_secs: nil, max_duration_end_message: nil, position: nil, precall_lookup_url: nil, prompt_flow: nil, slack: nil, sms_enabled: nil, sms_template: nil, structured_output_config: nil, structured_output_prompt: nil, stt_context: nil, stt_model: nil, thinking_sound: nil, thinking_sound_probability: nil, thinking_sound_volume: nil, transfer_destinations: nil, type: nil, voice: nil, voicemail_message: nil, voicemail_sms_prompt: nil, warm_transfer_summary_instructions: nil, webhook_url: nil, zoho: nil, request_options: {})
16
16
  #
17
17
  # @param name [String]
18
18
  #
@@ -36,8 +36,6 @@ module Revox
36
36
  #
37
37
  # @param email_notification_address [String, nil] Email address(es) to receive notifications when a call ends with a matching outc
38
38
  #
39
- # @param email_notification_language [Symbol, Revox::Models::AssistantCreateParams::EmailNotificationLanguage] The language used for the notification email content. One of "en" or "fr". Defau
40
- #
41
39
  # @param email_notification_outcomes [Array<Symbol, Revox::Models::AssistantCreateParams::EmailNotificationOutcome>, nil] Which call outcomes trigger an email notification. E.g. ["interested", "complete
42
40
  #
43
41
  # @param end_of_call_sentence [String] Optional message to say when the agent decides to end the call.
@@ -52,7 +50,7 @@ module Revox
52
50
  #
53
51
  # @param from_phone_number [String, nil] Override the default outbound phone number for calls placed with this assistant.
54
52
  #
55
- # @param human_transfer_mode [Symbol, Revox::Models::AssistantCreateParams::HumanTransferMode, nil] When transfer_phone_number is set: "warm" (AI bridges) or "cold" (SIP REFER; tru
53
+ # @param human_transfer_mode [Symbol, Revox::Models::AssistantCreateParams::HumanTransferMode, nil] When transfer_destinations is non-empty: "warm" (AI bridges) or "cold" (SIP REFE
56
54
  #
57
55
  # @param ivr_navigation_enabled [Boolean] Enable IVR navigation tools. When enabled, the assistant can send DTMF tones and
58
56
  #
@@ -66,6 +64,8 @@ module Revox
66
64
  #
67
65
  # @param position [Revox::Models::AssistantCreateParams::Position, nil] Canvas position of this assistant's node in its multi-step flow editor.
68
66
  #
67
+ # @param precall_lookup_url [String, nil] Inbound calls only. URL fetched over HTTP GET right before the call is answered,
68
+ #
69
69
  # @param prompt_flow [Revox::Models::AssistantCreateParams::PromptFlow, nil] Visual prompt constructor data (nodes, edges, positions). Used by the UI to re-o
70
70
  #
71
71
  # @param slack [Revox::Models::AssistantCreateParams::Slack, nil] Slack notification config. When set, posts a message to the chosen channel after
@@ -88,7 +88,7 @@ module Revox
88
88
  #
89
89
  # @param thinking_sound_volume [Float] Volume of the thinking sound (0 = silent, 1 = max).
90
90
  #
91
- # @param transfer_phone_number [String, nil] Phone number to transfer calls to when users request to speak to a human agent i
91
+ # @param transfer_destinations [Array<Revox::Models::AssistantCreateParams::TransferDestination>, nil] Where calls can be transferred to when users ask to speak to a human. With a sin
92
92
  #
93
93
  # @param type [Symbol, Revox::Models::AssistantCreateParams::Type] Assistant kind. 'standalone' (default) is a normal assistant, 'multi-step' orche
94
94
  #
@@ -150,7 +150,7 @@ module Revox
150
150
  # the prompt, voice, first sentence, name, or any other assistant property without
151
151
  # affecting the rest of the configuration.
152
152
  #
153
- # @overload update(id, after_call_sms_outcomes: nil, after_call_sms_prompt: nil, background_sound: nil, background_sound_volume: nil, calendly: nil, call_retry_config: nil, cartesia_dictionary_pronunciation_id: nil, custom_tools: nil, email_notification_address: nil, email_notification_language: nil, email_notification_outcomes: nil, end_of_call_sentence: nil, faq_items: nil, first_sentence: nil, first_sentence_delay_ms: nil, first_sentence_mode: nil, from_phone_number: nil, human_transfer_mode: nil, ivr_navigation_enabled: nil, llm_model: nil, logo_url: nil, max_call_duration_secs: nil, max_duration_end_message: nil, name: nil, position: nil, prompt: nil, prompt_flow: nil, slack: nil, sms_enabled: nil, sms_template: nil, structured_output_config: nil, structured_output_prompt: nil, stt_context: nil, stt_model: nil, thinking_sound: nil, thinking_sound_probability: nil, thinking_sound_volume: nil, transfer_phone_number: nil, type: nil, voice: nil, voicemail_message: nil, voicemail_sms_prompt: nil, warm_transfer_summary_instructions: nil, webhook_url: nil, zoho: nil, request_options: {})
153
+ # @overload update(id, after_call_sms_outcomes: nil, after_call_sms_prompt: nil, background_sound: nil, background_sound_volume: nil, calendly: nil, call_retry_config: nil, cartesia_dictionary_pronunciation_id: nil, custom_tools: nil, email_notification_address: nil, email_notification_outcomes: nil, end_of_call_sentence: nil, faq_items: nil, first_sentence: nil, first_sentence_delay_ms: nil, first_sentence_mode: nil, from_phone_number: nil, human_transfer_mode: nil, ivr_navigation_enabled: nil, llm_model: nil, logo_url: nil, max_call_duration_secs: nil, max_duration_end_message: nil, name: nil, position: nil, precall_lookup_url: nil, prompt: nil, prompt_flow: nil, slack: nil, sms_enabled: nil, sms_template: nil, structured_output_config: nil, structured_output_prompt: nil, stt_context: nil, stt_model: nil, thinking_sound: nil, thinking_sound_probability: nil, thinking_sound_volume: nil, transfer_destinations: nil, type: nil, voice: nil, voicemail_message: nil, voicemail_sms_prompt: nil, warm_transfer_summary_instructions: nil, webhook_url: nil, zoho: nil, request_options: {})
154
154
  #
155
155
  # @param id [String]
156
156
  #
@@ -172,8 +172,6 @@ module Revox
172
172
  #
173
173
  # @param email_notification_address [String, nil] Email address(es) to receive notifications when a call ends with a matching outc
174
174
  #
175
- # @param email_notification_language [Symbol, Revox::Models::AssistantUpdateParams::EmailNotificationLanguage] The language used for the notification email content. One of "en" or "fr". Defau
176
- #
177
175
  # @param email_notification_outcomes [Array<Symbol, Revox::Models::AssistantUpdateParams::EmailNotificationOutcome>, nil] Which call outcomes trigger an email notification. E.g. ["interested", "complete
178
176
  #
179
177
  # @param end_of_call_sentence [String] Optional message to say when the agent decides to end the call.
@@ -188,7 +186,7 @@ module Revox
188
186
  #
189
187
  # @param from_phone_number [String, nil] Override the default outbound phone number for calls placed with this assistant.
190
188
  #
191
- # @param human_transfer_mode [Symbol, Revox::Models::AssistantUpdateParams::HumanTransferMode, nil] When transfer_phone_number is set: "warm" (AI bridges) or "cold" (SIP REFER; tru
189
+ # @param human_transfer_mode [Symbol, Revox::Models::AssistantUpdateParams::HumanTransferMode, nil] When transfer_destinations is non-empty: "warm" (AI bridges) or "cold" (SIP REFE
192
190
  #
193
191
  # @param ivr_navigation_enabled [Boolean] Enable IVR navigation tools. When enabled, the assistant can send DTMF tones and
194
192
  #
@@ -204,6 +202,8 @@ module Revox
204
202
  #
205
203
  # @param position [Revox::Models::AssistantUpdateParams::Position, nil] Canvas position of this assistant's node in its multi-step flow editor.
206
204
  #
205
+ # @param precall_lookup_url [String, nil] Inbound calls only. URL fetched over HTTP GET right before the call is answered,
206
+ #
207
207
  # @param prompt [String] The prompt to use for the call. This will be given to the LLM (gpt-4.1)
208
208
  #
209
209
  # @param prompt_flow [Revox::Models::AssistantUpdateParams::PromptFlow, nil] Visual prompt constructor data (nodes, edges, positions). Used by the UI to re-o
@@ -228,7 +228,7 @@ module Revox
228
228
  #
229
229
  # @param thinking_sound_volume [Float] Volume of the thinking sound (0 = silent, 1 = max).
230
230
  #
231
- # @param transfer_phone_number [String, nil] Phone number to transfer calls to when users request to speak to a human agent i
231
+ # @param transfer_destinations [Array<Revox::Models::AssistantUpdateParams::TransferDestination>, nil] Where calls can be transferred to when users ask to speak to a human. With a sin
232
232
  #
233
233
  # @param type [Symbol, Revox::Models::AssistantUpdateParams::Type] Assistant kind. 'standalone' (default) is a normal assistant, 'multi-step' orche
234
234
  #
@@ -301,6 +301,27 @@ module Revox
301
301
  )
302
302
  end
303
303
 
304
+ # Create a full copy of an existing assistant, including every configuration field
305
+ # and FAQ items. The new assistant has the same configuration as the source, with
306
+ # the name suffixed by "(Copy)" and a freshly generated API key.
307
+ #
308
+ # @overload clone_(id, request_options: {})
309
+ #
310
+ # @param id [String]
311
+ # @param request_options [Revox::RequestOptions, Hash{Symbol=>Object}, nil]
312
+ #
313
+ # @return [Revox::Models::AssistantCloneResponse]
314
+ #
315
+ # @see Revox::Models::AssistantCloneParams
316
+ def clone_(id, params = {})
317
+ @client.request(
318
+ method: :post,
319
+ path: ["assistants/%1$s/clone", id],
320
+ model: Revox::Models::AssistantCloneResponse,
321
+ options: params[:request_options]
322
+ )
323
+ end
324
+
304
325
  # @api private
305
326
  #
306
327
  # @param client [Revox::Client]
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Revox
4
+ module Resources
5
+ class AuthStatus
6
+ # Check if your API key is still valid.
7
+ #
8
+ # @overload retrieve(request_options: {})
9
+ #
10
+ # @param request_options [Revox::RequestOptions, Hash{Symbol=>Object}, nil]
11
+ #
12
+ # @return [Revox::Models::AuthStatusRetrieveResponse]
13
+ #
14
+ # @see Revox::Models::AuthStatusRetrieveParams
15
+ def retrieve(params = {})
16
+ @client.request(
17
+ method: :get,
18
+ path: "auth-status",
19
+ model: Revox::Models::AuthStatusRetrieveResponse,
20
+ options: params[:request_options]
21
+ )
22
+ end
23
+
24
+ # @api private
25
+ #
26
+ # @param client [Revox::Client]
27
+ def initialize(client:)
28
+ @client = client
29
+ end
30
+ end
31
+ end
32
+ end