revox 0.0.2 → 0.1.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +25 -0
- data/README.md +63 -22
- data/lib/revox/client.rb +4 -0
- data/lib/revox/internal/type/base_model.rb +3 -3
- data/lib/revox/internal/util.rb +31 -0
- data/lib/revox/models/assistant_create_params.rb +2 -2
- data/lib/revox/models/assistant_delete_params.rb +7 -1
- data/lib/revox/models/assistant_retrieve_params.rb +7 -1
- data/lib/revox/models/assistant_update_params.rb +10 -3
- data/lib/revox/models/call_create_params.rb +2 -2
- data/lib/revox/models/call_create_response.rb +720 -12
- data/lib/revox/models/call_list_params.rb +30 -7
- data/lib/revox/models/call_list_response.rb +63 -1
- data/lib/revox/models/call_retrieve_params.rb +7 -1
- data/lib/revox/models/call_retrieve_response.rb +723 -12
- data/lib/revox/models/campaign_cancel_params.rb +20 -0
- data/lib/revox/models/campaign_cancel_response.rb +16 -0
- data/lib/revox/models/campaign_create_params.rb +174 -0
- data/lib/revox/models/campaign_create_response.rb +775 -0
- data/lib/revox/models/campaign_delete_params.rb +20 -0
- data/lib/revox/models/campaign_delete_response.rb +16 -0
- data/lib/revox/models/campaign_export_rows_params.rb +20 -0
- data/lib/revox/models/campaign_export_rows_response.rb +22 -0
- data/lib/revox/models/campaign_get_rows_params.rb +65 -0
- data/lib/revox/models/campaign_get_rows_response.rb +1468 -0
- data/lib/revox/models/campaign_list_params.rb +14 -0
- data/lib/revox/models/campaign_list_response.rb +771 -0
- data/lib/revox/models/campaign_retrieve_params.rb +20 -0
- data/lib/revox/models/campaign_retrieve_response.rb +776 -0
- data/lib/revox/models/voice_preview_params.rb +1 -9
- data/lib/revox/models/voice_retrieve_params.rb +7 -1
- data/lib/revox/models.rb +14 -0
- data/lib/revox/resources/assistants.rb +26 -2
- data/lib/revox/resources/call.rb +20 -8
- data/lib/revox/resources/campaigns.rb +181 -0
- data/lib/revox/resources/voices.rb +12 -8
- data/lib/revox/version.rb +1 -1
- data/lib/revox.rb +15 -0
- data/rbi/revox/client.rbi +3 -0
- data/rbi/revox/internal/util.rbi +20 -0
- data/rbi/revox/models/assistant_create_params.rbi +3 -5
- data/rbi/revox/models/assistant_delete_params.rbi +11 -5
- data/rbi/revox/models/assistant_retrieve_params.rbi +11 -5
- data/rbi/revox/models/assistant_update_params.rbi +9 -5
- data/rbi/revox/models/call_create_params.rbi +3 -5
- data/rbi/revox/models/call_create_response.rbi +1537 -11
- data/rbi/revox/models/call_list_params.rbi +53 -6
- data/rbi/revox/models/call_list_response.rbi +162 -0
- data/rbi/revox/models/call_retrieve_params.rbi +11 -5
- data/rbi/revox/models/call_retrieve_response.rbi +1543 -11
- data/rbi/revox/models/campaign_cancel_params.rbi +33 -0
- data/rbi/revox/models/campaign_cancel_response.rbi +23 -0
- data/rbi/revox/models/campaign_create_params.rbi +297 -0
- data/rbi/revox/models/campaign_create_response.rbi +1490 -0
- data/rbi/revox/models/campaign_delete_params.rbi +33 -0
- data/rbi/revox/models/campaign_delete_response.rbi +23 -0
- data/rbi/revox/models/campaign_export_rows_params.rbi +33 -0
- data/rbi/revox/models/campaign_export_rows_response.rbi +29 -0
- data/rbi/revox/models/campaign_get_rows_params.rbi +113 -0
- data/rbi/revox/models/campaign_get_rows_response.rbi +2981 -0
- data/rbi/revox/models/campaign_list_params.rbi +27 -0
- data/rbi/revox/models/campaign_list_response.rbi +1482 -0
- data/rbi/revox/models/campaign_retrieve_params.rbi +33 -0
- data/rbi/revox/models/campaign_retrieve_response.rbi +1495 -0
- data/rbi/revox/models/voice_preview_params.rbi +0 -11
- data/rbi/revox/models/voice_retrieve_params.rbi +6 -1
- data/rbi/revox/models.rbi +14 -0
- data/rbi/revox/resources/assistants.rbi +21 -2
- data/rbi/revox/resources/call.rbi +18 -6
- data/rbi/revox/resources/campaigns.rbi +128 -0
- data/rbi/revox/resources/voices.rbi +9 -7
- data/sig/revox/client.rbs +2 -0
- data/sig/revox/internal/util.rbs +10 -0
- data/sig/revox/models/assistant_create_params.rbs +8 -4
- data/sig/revox/models/assistant_delete_params.rbs +8 -3
- data/sig/revox/models/assistant_retrieve_params.rbs +8 -3
- data/sig/revox/models/assistant_update_params.rbs +13 -4
- data/sig/revox/models/call_create_params.rbs +8 -4
- data/sig/revox/models/call_create_response.rbs +615 -8
- data/sig/revox/models/call_list_params.rbs +42 -7
- data/sig/revox/models/call_list_response.rbs +57 -2
- data/sig/revox/models/call_retrieve_params.rbs +9 -3
- data/sig/revox/models/call_retrieve_response.rbs +615 -8
- data/sig/revox/models/campaign_cancel_params.rbs +20 -0
- data/sig/revox/models/campaign_cancel_response.rbs +13 -0
- data/sig/revox/models/campaign_create_params.rbs +149 -0
- data/sig/revox/models/campaign_create_response.rbs +666 -0
- data/sig/revox/models/campaign_delete_params.rbs +20 -0
- data/sig/revox/models/campaign_delete_response.rbs +13 -0
- data/sig/revox/models/campaign_export_rows_params.rbs +20 -0
- data/sig/revox/models/campaign_export_rows_response.rbs +15 -0
- data/sig/revox/models/campaign_get_rows_params.rbs +82 -0
- data/sig/revox/models/campaign_get_rows_response.rbs +1220 -0
- data/sig/revox/models/campaign_list_params.rbs +14 -0
- data/sig/revox/models/campaign_list_response.rbs +666 -0
- data/sig/revox/models/campaign_retrieve_params.rbs +20 -0
- data/sig/revox/models/campaign_retrieve_response.rbs +666 -0
- data/sig/revox/models/voice_preview_params.rbs +1 -8
- data/sig/revox/models/voice_retrieve_params.rbs +5 -1
- data/sig/revox/models.rbs +14 -0
- data/sig/revox/resources/assistants.rbs +2 -2
- data/sig/revox/resources/call.rbs +3 -2
- data/sig/revox/resources/campaigns.rbs +52 -0
- data/sig/revox/resources/voices.rbs +0 -1
- metadata +47 -2
|
@@ -19,19 +19,11 @@ module Revox
|
|
|
19
19
|
# @return [String]
|
|
20
20
|
required :voice_id, String, api_name: :voiceId
|
|
21
21
|
|
|
22
|
-
# @!
|
|
23
|
-
# The text to generate a preview for.
|
|
24
|
-
#
|
|
25
|
-
# @return [String, nil]
|
|
26
|
-
optional :text, String
|
|
27
|
-
|
|
28
|
-
# @!method initialize(provider:, voice_id:, text: nil, request_options: {})
|
|
22
|
+
# @!method initialize(provider:, voice_id:, request_options: {})
|
|
29
23
|
# @param provider [Symbol, Revox::Models::VoicePreviewParams::Provider] The provider to use for the preview.
|
|
30
24
|
#
|
|
31
25
|
# @param voice_id [String] The voice ID to generate a preview for.
|
|
32
26
|
#
|
|
33
|
-
# @param text [String] The text to generate a preview for.
|
|
34
|
-
#
|
|
35
27
|
# @param request_options [Revox::RequestOptions, Hash{Symbol=>Object}]
|
|
36
28
|
|
|
37
29
|
# The provider to use for the preview.
|
|
@@ -7,12 +7,18 @@ module Revox
|
|
|
7
7
|
extend Revox::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Revox::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
+
# @!attribute id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :id, String
|
|
14
|
+
|
|
10
15
|
# @!attribute provider
|
|
11
16
|
#
|
|
12
17
|
# @return [Symbol, Revox::Models::VoiceRetrieveParams::Provider]
|
|
13
18
|
required :provider, enum: -> { Revox::VoiceRetrieveParams::Provider }
|
|
14
19
|
|
|
15
|
-
# @!method initialize(provider:, request_options: {})
|
|
20
|
+
# @!method initialize(id:, provider:, request_options: {})
|
|
21
|
+
# @param id [String]
|
|
16
22
|
# @param provider [Symbol, Revox::Models::VoiceRetrieveParams::Provider]
|
|
17
23
|
# @param request_options [Revox::RequestOptions, Hash{Symbol=>Object}]
|
|
18
24
|
|
data/lib/revox/models.rb
CHANGED
|
@@ -55,6 +55,20 @@ module Revox
|
|
|
55
55
|
|
|
56
56
|
CallRetrieveParams = Revox::Models::CallRetrieveParams
|
|
57
57
|
|
|
58
|
+
CampaignCancelParams = Revox::Models::CampaignCancelParams
|
|
59
|
+
|
|
60
|
+
CampaignCreateParams = Revox::Models::CampaignCreateParams
|
|
61
|
+
|
|
62
|
+
CampaignDeleteParams = Revox::Models::CampaignDeleteParams
|
|
63
|
+
|
|
64
|
+
CampaignExportRowsParams = Revox::Models::CampaignExportRowsParams
|
|
65
|
+
|
|
66
|
+
CampaignGetRowsParams = Revox::Models::CampaignGetRowsParams
|
|
67
|
+
|
|
68
|
+
CampaignListParams = Revox::Models::CampaignListParams
|
|
69
|
+
|
|
70
|
+
CampaignRetrieveParams = Revox::Models::CampaignRetrieveParams
|
|
71
|
+
|
|
58
72
|
Users = Revox::Models::Users
|
|
59
73
|
|
|
60
74
|
VoiceListParams = Revox::Models::VoiceListParams
|
|
@@ -6,6 +6,12 @@ module Revox
|
|
|
6
6
|
# Some parameter documentations has been truncated, see
|
|
7
7
|
# {Revox::Models::AssistantCreateParams} for more details.
|
|
8
8
|
#
|
|
9
|
+
# Create a new AI assistant with a custom prompt, voice, and behavior
|
|
10
|
+
# configuration. Assistants define how the AI agent behaves during calls,
|
|
11
|
+
# including the system prompt given to the LLM, the first sentence spoken, the
|
|
12
|
+
# voice provider and voice ID (Cartesia or ElevenLabs), and end-of-call behavior.
|
|
13
|
+
# Once created, reference the assistant by its ID when placing calls.
|
|
14
|
+
#
|
|
9
15
|
# @overload create(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: {})
|
|
10
16
|
#
|
|
11
17
|
# @param name [String]
|
|
@@ -14,7 +20,7 @@ module Revox
|
|
|
14
20
|
#
|
|
15
21
|
# @param background_sound [Symbol, Revox::Models::AssistantCreateParams::BackgroundSound, nil] The background sound to play during the call. Useful to give the impression that
|
|
16
22
|
#
|
|
17
|
-
# @param calendly [Revox::Models::AssistantCreateParams::Calendly
|
|
23
|
+
# @param calendly [Revox::Models::AssistantCreateParams::Calendly]
|
|
18
24
|
#
|
|
19
25
|
# @param call_retry_config [Revox::Models::AssistantCreateParams::CallRetryConfig] Configuration for call retry behavior including time windows, delays, and max it
|
|
20
26
|
#
|
|
@@ -60,6 +66,11 @@ module Revox
|
|
|
60
66
|
)
|
|
61
67
|
end
|
|
62
68
|
|
|
69
|
+
# Retrieve a single assistant by its unique ID. Returns the full assistant
|
|
70
|
+
# configuration including prompt, voice settings, and first sentence mode. Useful
|
|
71
|
+
# for inspecting an assistant's current setup before updating it or placing a
|
|
72
|
+
# call.
|
|
73
|
+
#
|
|
63
74
|
# @overload retrieve(id, request_options: {})
|
|
64
75
|
#
|
|
65
76
|
# @param id [String]
|
|
@@ -80,13 +91,18 @@ module Revox
|
|
|
80
91
|
# Some parameter documentations has been truncated, see
|
|
81
92
|
# {Revox::Models::AssistantUpdateParams} for more details.
|
|
82
93
|
#
|
|
94
|
+
# Update one or more fields on an existing assistant. Supports partial updates —
|
|
95
|
+
# only the fields you include in the request body will be changed. You can update
|
|
96
|
+
# the prompt, voice, first sentence, name, or any other assistant property without
|
|
97
|
+
# affecting the rest of the configuration.
|
|
98
|
+
#
|
|
83
99
|
# @overload update(id, 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, name: nil, prompt: nil, structured_output_config: nil, transfer_phone_number: nil, voice: nil, voicemail_message: nil, webhook_url: nil, request_options: {})
|
|
84
100
|
#
|
|
85
101
|
# @param id [String]
|
|
86
102
|
#
|
|
87
103
|
# @param background_sound [Symbol, Revox::Models::AssistantUpdateParams::BackgroundSound, nil] The background sound to play during the call. Useful to give the impression that
|
|
88
104
|
#
|
|
89
|
-
# @param calendly [Revox::Models::AssistantUpdateParams::Calendly
|
|
105
|
+
# @param calendly [Revox::Models::AssistantUpdateParams::Calendly]
|
|
90
106
|
#
|
|
91
107
|
# @param call_retry_config [Revox::Models::AssistantUpdateParams::CallRetryConfig] Configuration for call retry behavior including time windows, delays, and max it
|
|
92
108
|
#
|
|
@@ -136,6 +152,10 @@ module Revox
|
|
|
136
152
|
)
|
|
137
153
|
end
|
|
138
154
|
|
|
155
|
+
# Retrieve all assistants associated with your account. Each assistant in the
|
|
156
|
+
# response includes its full configuration: prompt, voice settings, and first
|
|
157
|
+
# sentence. Use this endpoint to list available assistants before placing calls.
|
|
158
|
+
#
|
|
139
159
|
# @overload list(request_options: {})
|
|
140
160
|
#
|
|
141
161
|
# @param request_options [Revox::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
@@ -152,6 +172,10 @@ module Revox
|
|
|
152
172
|
)
|
|
153
173
|
end
|
|
154
174
|
|
|
175
|
+
# Permanently delete an assistant by its ID. Any future calls referencing this
|
|
176
|
+
# assistant ID will fail. Existing call records that used this assistant are not
|
|
177
|
+
# affected.
|
|
178
|
+
#
|
|
155
179
|
# @overload delete(id, request_options: {})
|
|
156
180
|
#
|
|
157
181
|
# @param id [String]
|
data/lib/revox/resources/call.rb
CHANGED
|
@@ -6,8 +6,12 @@ module Revox
|
|
|
6
6
|
# Some parameter documentations has been truncated, see
|
|
7
7
|
# {Revox::Models::CallCreateParams} for more details.
|
|
8
8
|
#
|
|
9
|
-
# Place a new call order.
|
|
10
|
-
#
|
|
9
|
+
# Place a new outbound call order. Provide either an existing assistant ID or a
|
|
10
|
+
# custom assistant configuration. The call can be scheduled for a specific time or
|
|
11
|
+
# started immediately. A single call order may be resolved over multiple call
|
|
12
|
+
# attempts spanning up to a few days, with automatic retries when voicemail is
|
|
13
|
+
# detected. You can also set concurrency limits and pass prompt variables for
|
|
14
|
+
# dynamic personalization.
|
|
11
15
|
#
|
|
12
16
|
# @overload create(phone_number:, assistant: nil, assistant_id: nil, concurrency: nil, force_now: nil, from_phone_number: nil, metadata: nil, prompt_variables: nil, scheduled_at: nil, request_options: {})
|
|
13
17
|
#
|
|
@@ -45,7 +49,10 @@ module Revox
|
|
|
45
49
|
)
|
|
46
50
|
end
|
|
47
51
|
|
|
48
|
-
#
|
|
52
|
+
# Retrieve the full details of a call order by its unique ID. The response
|
|
53
|
+
# includes the call status, call attempts, transcript, recording URL, timestamps,
|
|
54
|
+
# and metadata. Use this endpoint to poll for call completion or inspect results
|
|
55
|
+
# after a call has finished.
|
|
49
56
|
#
|
|
50
57
|
# @overload retrieve(id, request_options: {})
|
|
51
58
|
#
|
|
@@ -65,13 +72,17 @@ module Revox
|
|
|
65
72
|
)
|
|
66
73
|
end
|
|
67
74
|
|
|
68
|
-
#
|
|
75
|
+
# Retrieve a paginated list of call attempts. Each entry includes the call status,
|
|
76
|
+
# phone number, assistant used, transcript, and timestamps. Use the page and
|
|
77
|
+
# page_size query parameters to navigate through results.
|
|
69
78
|
#
|
|
70
|
-
# @overload list(page:, page_size:, request_options: {})
|
|
79
|
+
# @overload list(page:, page_size:, statuses: nil, request_options: {})
|
|
71
80
|
#
|
|
72
|
-
# @param page [
|
|
81
|
+
# @param page [Integer] The page number you want to get. Starting at 0.
|
|
73
82
|
#
|
|
74
|
-
# @param page_size [
|
|
83
|
+
# @param page_size [Integer] The number of calls to return per page.
|
|
84
|
+
#
|
|
85
|
+
# @param statuses [Array<Symbol, Revox::Models::CallListParams::Status>]
|
|
75
86
|
#
|
|
76
87
|
# @param request_options [Revox::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
77
88
|
#
|
|
@@ -80,10 +91,11 @@ module Revox
|
|
|
80
91
|
# @see Revox::Models::CallListParams
|
|
81
92
|
def list(params)
|
|
82
93
|
parsed, options = Revox::CallListParams.dump_request(params)
|
|
94
|
+
query = Revox::Internal::Util.encode_query_params(parsed)
|
|
83
95
|
@client.request(
|
|
84
96
|
method: :get,
|
|
85
97
|
path: "call",
|
|
86
|
-
query:
|
|
98
|
+
query: query,
|
|
87
99
|
model: Revox::Models::CallListResponse,
|
|
88
100
|
options: options
|
|
89
101
|
)
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Revox
|
|
4
|
+
module Resources
|
|
5
|
+
class Campaigns
|
|
6
|
+
# Some parameter documentations has been truncated, see
|
|
7
|
+
# {Revox::Models::CampaignCreateParams} for more details.
|
|
8
|
+
#
|
|
9
|
+
# Create a new outbound calling campaign and launch it immediately. If
|
|
10
|
+
# scheduled_at is set, all calls will be queued until the specified time instead
|
|
11
|
+
# of starting right away.
|
|
12
|
+
#
|
|
13
|
+
# @overload create(assistant_id:, contacts:, name:, call_retry_config: nil, from_phone_number: nil, max_concurrent_calls: nil, scheduled_at: nil, request_options: {})
|
|
14
|
+
#
|
|
15
|
+
# @param assistant_id [String] The ID of the assistant to use
|
|
16
|
+
#
|
|
17
|
+
# @param contacts [Array<Revox::Models::CampaignCreateParams::Contact>] The list of contacts to call
|
|
18
|
+
#
|
|
19
|
+
# @param name [String] The name of the campaign
|
|
20
|
+
#
|
|
21
|
+
# @param call_retry_config [Revox::Models::CampaignCreateParams::CallRetryConfig] Override retry configuration for calls in this campaign. If not provided, uses t
|
|
22
|
+
#
|
|
23
|
+
# @param from_phone_number [String] The phone number to use for outbound calls (E.164 format, e.g., +1234567890)
|
|
24
|
+
#
|
|
25
|
+
# @param max_concurrent_calls [Float] Maximum number of concurrent calls allowed for this campaign
|
|
26
|
+
#
|
|
27
|
+
# @param scheduled_at [Time, Object] Schedule all calls in this campaign to start at a specific date and time (ISO 86
|
|
28
|
+
#
|
|
29
|
+
# @param request_options [Revox::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
30
|
+
#
|
|
31
|
+
# @return [Revox::Models::CampaignCreateResponse]
|
|
32
|
+
#
|
|
33
|
+
# @see Revox::Models::CampaignCreateParams
|
|
34
|
+
def create(params)
|
|
35
|
+
parsed, options = Revox::CampaignCreateParams.dump_request(params)
|
|
36
|
+
@client.request(
|
|
37
|
+
method: :post,
|
|
38
|
+
path: "campaigns",
|
|
39
|
+
body: parsed,
|
|
40
|
+
model: Revox::Models::CampaignCreateResponse,
|
|
41
|
+
options: options
|
|
42
|
+
)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Retrieve the full details of a single campaign by its unique ID. Can be used to
|
|
46
|
+
# poll for campaign completion.
|
|
47
|
+
#
|
|
48
|
+
# @overload retrieve(id, request_options: {})
|
|
49
|
+
#
|
|
50
|
+
# @param id [String]
|
|
51
|
+
# @param request_options [Revox::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
52
|
+
#
|
|
53
|
+
# @return [Revox::Models::CampaignRetrieveResponse]
|
|
54
|
+
#
|
|
55
|
+
# @see Revox::Models::CampaignRetrieveParams
|
|
56
|
+
def retrieve(id, params = {})
|
|
57
|
+
@client.request(
|
|
58
|
+
method: :get,
|
|
59
|
+
path: ["campaigns/%1$s", id],
|
|
60
|
+
model: Revox::Models::CampaignRetrieveResponse,
|
|
61
|
+
options: params[:request_options]
|
|
62
|
+
)
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Retrieve all campaigns for your organization, including both active and
|
|
66
|
+
# completed ones.
|
|
67
|
+
#
|
|
68
|
+
# @overload list(request_options: {})
|
|
69
|
+
#
|
|
70
|
+
# @param request_options [Revox::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
71
|
+
#
|
|
72
|
+
# @return [Revox::Models::CampaignListResponse]
|
|
73
|
+
#
|
|
74
|
+
# @see Revox::Models::CampaignListParams
|
|
75
|
+
def list(params = {})
|
|
76
|
+
@client.request(
|
|
77
|
+
method: :get,
|
|
78
|
+
path: "campaigns",
|
|
79
|
+
model: Revox::Models::CampaignListResponse,
|
|
80
|
+
options: params[:request_options]
|
|
81
|
+
)
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Permanently delete a campaign and all its associated rows. This action is
|
|
85
|
+
# irreversible. In-progress calls will not be affected, but no new calls will be
|
|
86
|
+
# placed.
|
|
87
|
+
#
|
|
88
|
+
# @overload delete(id, request_options: {})
|
|
89
|
+
#
|
|
90
|
+
# @param id [String]
|
|
91
|
+
# @param request_options [Revox::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
92
|
+
#
|
|
93
|
+
# @return [Revox::Models::CampaignDeleteResponse]
|
|
94
|
+
#
|
|
95
|
+
# @see Revox::Models::CampaignDeleteParams
|
|
96
|
+
def delete(id, params = {})
|
|
97
|
+
@client.request(
|
|
98
|
+
method: :delete,
|
|
99
|
+
path: ["campaigns/%1$s", id],
|
|
100
|
+
model: Revox::Models::CampaignDeleteResponse,
|
|
101
|
+
options: params[:request_options]
|
|
102
|
+
)
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Cancel a running or scheduled campaign. Pending and queued calls will be
|
|
106
|
+
# aborted, while in-progress calls will be allowed to finish. Unlike deletion, the
|
|
107
|
+
# campaign and its rows are preserved for historical reference.
|
|
108
|
+
#
|
|
109
|
+
# @overload cancel(id, request_options: {})
|
|
110
|
+
#
|
|
111
|
+
# @param id [String]
|
|
112
|
+
# @param request_options [Revox::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
113
|
+
#
|
|
114
|
+
# @return [Revox::Models::CampaignCancelResponse]
|
|
115
|
+
#
|
|
116
|
+
# @see Revox::Models::CampaignCancelParams
|
|
117
|
+
def cancel(id, params = {})
|
|
118
|
+
@client.request(
|
|
119
|
+
method: :post,
|
|
120
|
+
path: ["campaigns/%1$s/cancel", id],
|
|
121
|
+
model: Revox::Models::CampaignCancelResponse,
|
|
122
|
+
options: params[:request_options]
|
|
123
|
+
)
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Export all rows of a campaign as a CSV file for offline analysis or reporting.
|
|
127
|
+
#
|
|
128
|
+
# @overload export_rows(id, request_options: {})
|
|
129
|
+
#
|
|
130
|
+
# @param id [String]
|
|
131
|
+
# @param request_options [Revox::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
132
|
+
#
|
|
133
|
+
# @return [Revox::Models::CampaignExportRowsResponse]
|
|
134
|
+
#
|
|
135
|
+
# @see Revox::Models::CampaignExportRowsParams
|
|
136
|
+
def export_rows(id, params = {})
|
|
137
|
+
@client.request(
|
|
138
|
+
method: :get,
|
|
139
|
+
path: ["campaigns/%1$s/export", id],
|
|
140
|
+
model: Revox::Models::CampaignExportRowsResponse,
|
|
141
|
+
options: params[:request_options]
|
|
142
|
+
)
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Retrieve a paginated list of rows (contacts) for a given campaign. Supports
|
|
146
|
+
# filtering by text query, call statuses, and call result.
|
|
147
|
+
#
|
|
148
|
+
# @overload get_rows(id, page:, page_size:, query: nil, result: nil, statuses: nil, request_options: {})
|
|
149
|
+
#
|
|
150
|
+
# @param id [String]
|
|
151
|
+
# @param page [Float]
|
|
152
|
+
# @param page_size [Float]
|
|
153
|
+
# @param query [String]
|
|
154
|
+
# @param result [Symbol, Revox::Models::CampaignGetRowsParams::Result]
|
|
155
|
+
# @param statuses [String]
|
|
156
|
+
# @param request_options [Revox::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
157
|
+
#
|
|
158
|
+
# @return [Revox::Models::CampaignGetRowsResponse]
|
|
159
|
+
#
|
|
160
|
+
# @see Revox::Models::CampaignGetRowsParams
|
|
161
|
+
def get_rows(id, params)
|
|
162
|
+
parsed, options = Revox::CampaignGetRowsParams.dump_request(params)
|
|
163
|
+
query = Revox::Internal::Util.encode_query_params(parsed)
|
|
164
|
+
@client.request(
|
|
165
|
+
method: :get,
|
|
166
|
+
path: ["campaigns/%1$s/rows", id],
|
|
167
|
+
query: query,
|
|
168
|
+
model: Revox::Models::CampaignGetRowsResponse,
|
|
169
|
+
options: options
|
|
170
|
+
)
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# @api private
|
|
174
|
+
#
|
|
175
|
+
# @param client [Revox::Client]
|
|
176
|
+
def initialize(client:)
|
|
177
|
+
@client = client
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
end
|
|
181
|
+
end
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
module Revox
|
|
4
4
|
module Resources
|
|
5
5
|
class Voices
|
|
6
|
-
#
|
|
6
|
+
# Retrieve details for a single voice by its unique ID and provider. Returns the
|
|
7
|
+
# voice name, description, and provider metadata.
|
|
7
8
|
#
|
|
8
9
|
# @overload retrieve(id, provider:, request_options: {})
|
|
9
10
|
#
|
|
@@ -18,17 +19,20 @@ module Revox
|
|
|
18
19
|
# @see Revox::Models::VoiceRetrieveParams
|
|
19
20
|
def retrieve(id, params)
|
|
20
21
|
parsed, options = Revox::VoiceRetrieveParams.dump_request(params)
|
|
22
|
+
query = Revox::Internal::Util.encode_query_params(parsed)
|
|
21
23
|
@client.request(
|
|
22
24
|
method: :get,
|
|
23
25
|
path: ["voices/%1$s", id],
|
|
24
|
-
query:
|
|
26
|
+
query: query,
|
|
25
27
|
model: Revox::Models::VoiceRetrieveResponse,
|
|
26
28
|
options: options
|
|
27
29
|
)
|
|
28
30
|
end
|
|
29
31
|
|
|
30
|
-
#
|
|
31
|
-
#
|
|
32
|
+
# Retrieve the full catalog of voices available for AI calls. The list includes
|
|
33
|
+
# voices from Cartesia and ElevenLabs, each with a name, language, accent, and
|
|
34
|
+
# provider-specific ID. Use this endpoint to browse voices before assigning one to
|
|
35
|
+
# an assistant or a call.
|
|
32
36
|
#
|
|
33
37
|
# @overload list(request_options: {})
|
|
34
38
|
#
|
|
@@ -46,16 +50,16 @@ module Revox
|
|
|
46
50
|
)
|
|
47
51
|
end
|
|
48
52
|
|
|
49
|
-
# Generate a
|
|
53
|
+
# Generate a short audio preview for a given voice. Provide the voice ID and
|
|
54
|
+
# provider, and the API returns an audio/mpeg stream you can play back to hear how
|
|
55
|
+
# the voice sounds before assigning it to an assistant.
|
|
50
56
|
#
|
|
51
|
-
# @overload preview(provider:, voice_id:,
|
|
57
|
+
# @overload preview(provider:, voice_id:, request_options: {})
|
|
52
58
|
#
|
|
53
59
|
# @param provider [Symbol, Revox::Models::VoicePreviewParams::Provider] The provider to use for the preview.
|
|
54
60
|
#
|
|
55
61
|
# @param voice_id [String] The voice ID to generate a preview for.
|
|
56
62
|
#
|
|
57
|
-
# @param text [String] The text to generate a preview for.
|
|
58
|
-
#
|
|
59
63
|
# @param request_options [Revox::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
60
64
|
#
|
|
61
65
|
# @return [nil]
|
data/lib/revox/version.rb
CHANGED
data/lib/revox.rb
CHANGED
|
@@ -68,6 +68,20 @@ require_relative "revox/models/call_list_params"
|
|
|
68
68
|
require_relative "revox/models/call_list_response"
|
|
69
69
|
require_relative "revox/models/call_retrieve_params"
|
|
70
70
|
require_relative "revox/models/call_retrieve_response"
|
|
71
|
+
require_relative "revox/models/campaign_cancel_params"
|
|
72
|
+
require_relative "revox/models/campaign_cancel_response"
|
|
73
|
+
require_relative "revox/models/campaign_create_params"
|
|
74
|
+
require_relative "revox/models/campaign_create_response"
|
|
75
|
+
require_relative "revox/models/campaign_delete_params"
|
|
76
|
+
require_relative "revox/models/campaign_delete_response"
|
|
77
|
+
require_relative "revox/models/campaign_export_rows_params"
|
|
78
|
+
require_relative "revox/models/campaign_export_rows_response"
|
|
79
|
+
require_relative "revox/models/campaign_get_rows_params"
|
|
80
|
+
require_relative "revox/models/campaign_get_rows_response"
|
|
81
|
+
require_relative "revox/models/campaign_list_params"
|
|
82
|
+
require_relative "revox/models/campaign_list_response"
|
|
83
|
+
require_relative "revox/models/campaign_retrieve_params"
|
|
84
|
+
require_relative "revox/models/campaign_retrieve_response"
|
|
71
85
|
require_relative "revox/models/users/me_retrieve_params"
|
|
72
86
|
require_relative "revox/models/users/me_retrieve_response"
|
|
73
87
|
require_relative "revox/models/users/me_update_params"
|
|
@@ -80,6 +94,7 @@ require_relative "revox/models/voice_retrieve_response"
|
|
|
80
94
|
require_relative "revox/models"
|
|
81
95
|
require_relative "revox/resources/assistants"
|
|
82
96
|
require_relative "revox/resources/call"
|
|
97
|
+
require_relative "revox/resources/campaigns"
|
|
83
98
|
require_relative "revox/resources/users"
|
|
84
99
|
require_relative "revox/resources/users/me"
|
|
85
100
|
require_relative "revox/resources/voices"
|
data/rbi/revox/client.rbi
CHANGED
data/rbi/revox/internal/util.rbi
CHANGED
|
@@ -295,6 +295,26 @@ module Revox
|
|
|
295
295
|
T.let(%r{^application/(:?x-(?:n|l)djson)|(:?(?:x-)?jsonl)}, Regexp)
|
|
296
296
|
|
|
297
297
|
class << self
|
|
298
|
+
# @api private
|
|
299
|
+
sig do
|
|
300
|
+
params(query: Revox::Internal::AnyHash).returns(
|
|
301
|
+
Revox::Internal::AnyHash
|
|
302
|
+
)
|
|
303
|
+
end
|
|
304
|
+
def encode_query_params(query)
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
# @api private
|
|
308
|
+
sig do
|
|
309
|
+
params(
|
|
310
|
+
collection: Revox::Internal::AnyHash,
|
|
311
|
+
key: String,
|
|
312
|
+
element: T.anything
|
|
313
|
+
).void
|
|
314
|
+
end
|
|
315
|
+
private def write_query_param_element!(collection, key, element)
|
|
316
|
+
end
|
|
317
|
+
|
|
298
318
|
# @api private
|
|
299
319
|
sig do
|
|
300
320
|
params(
|
|
@@ -31,9 +31,7 @@ module Revox
|
|
|
31
31
|
attr_reader :calendly
|
|
32
32
|
|
|
33
33
|
sig do
|
|
34
|
-
params(
|
|
35
|
-
calendly: T.nilable(Revox::AssistantCreateParams::Calendly::OrHash)
|
|
36
|
-
).void
|
|
34
|
+
params(calendly: Revox::AssistantCreateParams::Calendly::OrHash).void
|
|
37
35
|
end
|
|
38
36
|
attr_writer :calendly
|
|
39
37
|
|
|
@@ -195,7 +193,7 @@ module Revox
|
|
|
195
193
|
prompt: String,
|
|
196
194
|
background_sound:
|
|
197
195
|
T.nilable(Revox::AssistantCreateParams::BackgroundSound::OrSymbol),
|
|
198
|
-
calendly:
|
|
196
|
+
calendly: Revox::AssistantCreateParams::Calendly::OrHash,
|
|
199
197
|
call_retry_config:
|
|
200
198
|
Revox::AssistantCreateParams::CallRetryConfig::OrHash,
|
|
201
199
|
end_of_call_sentence: String,
|
|
@@ -281,7 +279,7 @@ module Revox
|
|
|
281
279
|
T.nilable(
|
|
282
280
|
Revox::AssistantCreateParams::BackgroundSound::OrSymbol
|
|
283
281
|
),
|
|
284
|
-
calendly:
|
|
282
|
+
calendly: Revox::AssistantCreateParams::Calendly,
|
|
285
283
|
call_retry_config: Revox::AssistantCreateParams::CallRetryConfig,
|
|
286
284
|
end_of_call_sentence: String,
|
|
287
285
|
faq_items: T::Array[Revox::AssistantCreateParams::FaqItem],
|
|
@@ -11,15 +11,21 @@ module Revox
|
|
|
11
11
|
T.any(Revox::AssistantDeleteParams, Revox::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :id
|
|
16
|
+
|
|
14
17
|
sig do
|
|
15
|
-
params(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
params(
|
|
19
|
+
id: String,
|
|
20
|
+
request_options: Revox::RequestOptions::OrHash
|
|
21
|
+
).returns(T.attached_class)
|
|
18
22
|
end
|
|
19
|
-
def self.new(request_options: {})
|
|
23
|
+
def self.new(id:, request_options: {})
|
|
20
24
|
end
|
|
21
25
|
|
|
22
|
-
sig
|
|
26
|
+
sig do
|
|
27
|
+
override.returns({ id: String, request_options: Revox::RequestOptions })
|
|
28
|
+
end
|
|
23
29
|
def to_hash
|
|
24
30
|
end
|
|
25
31
|
end
|
|
@@ -11,15 +11,21 @@ module Revox
|
|
|
11
11
|
T.any(Revox::AssistantRetrieveParams, Revox::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :id
|
|
16
|
+
|
|
14
17
|
sig do
|
|
15
|
-
params(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
params(
|
|
19
|
+
id: String,
|
|
20
|
+
request_options: Revox::RequestOptions::OrHash
|
|
21
|
+
).returns(T.attached_class)
|
|
18
22
|
end
|
|
19
|
-
def self.new(request_options: {})
|
|
23
|
+
def self.new(id:, request_options: {})
|
|
20
24
|
end
|
|
21
25
|
|
|
22
|
-
sig
|
|
26
|
+
sig do
|
|
27
|
+
override.returns({ id: String, request_options: Revox::RequestOptions })
|
|
28
|
+
end
|
|
23
29
|
def to_hash
|
|
24
30
|
end
|
|
25
31
|
end
|
|
@@ -11,6 +11,9 @@ module Revox
|
|
|
11
11
|
T.any(Revox::AssistantUpdateParams, Revox::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :id
|
|
16
|
+
|
|
14
17
|
# The background sound to play during the call. Useful to give the impression that
|
|
15
18
|
# your AI agent is in an office, in the street, or anywhere else you want.
|
|
16
19
|
sig do
|
|
@@ -24,9 +27,7 @@ module Revox
|
|
|
24
27
|
attr_reader :calendly
|
|
25
28
|
|
|
26
29
|
sig do
|
|
27
|
-
params(
|
|
28
|
-
calendly: T.nilable(Revox::AssistantUpdateParams::Calendly::OrHash)
|
|
29
|
-
).void
|
|
30
|
+
params(calendly: Revox::AssistantUpdateParams::Calendly::OrHash).void
|
|
30
31
|
end
|
|
31
32
|
attr_writer :calendly
|
|
32
33
|
|
|
@@ -197,9 +198,10 @@ module Revox
|
|
|
197
198
|
|
|
198
199
|
sig do
|
|
199
200
|
params(
|
|
201
|
+
id: String,
|
|
200
202
|
background_sound:
|
|
201
203
|
T.nilable(Revox::AssistantUpdateParams::BackgroundSound::OrSymbol),
|
|
202
|
-
calendly:
|
|
204
|
+
calendly: Revox::AssistantUpdateParams::Calendly::OrHash,
|
|
203
205
|
call_retry_config:
|
|
204
206
|
Revox::AssistantUpdateParams::CallRetryConfig::OrHash,
|
|
205
207
|
end_of_call_sentence: String,
|
|
@@ -229,6 +231,7 @@ module Revox
|
|
|
229
231
|
).returns(T.attached_class)
|
|
230
232
|
end
|
|
231
233
|
def self.new(
|
|
234
|
+
id:,
|
|
232
235
|
# The background sound to play during the call. Useful to give the impression that
|
|
233
236
|
# your AI agent is in an office, in the street, or anywhere else you want.
|
|
234
237
|
background_sound: nil,
|
|
@@ -281,11 +284,12 @@ module Revox
|
|
|
281
284
|
sig do
|
|
282
285
|
override.returns(
|
|
283
286
|
{
|
|
287
|
+
id: String,
|
|
284
288
|
background_sound:
|
|
285
289
|
T.nilable(
|
|
286
290
|
Revox::AssistantUpdateParams::BackgroundSound::OrSymbol
|
|
287
291
|
),
|
|
288
|
-
calendly:
|
|
292
|
+
calendly: Revox::AssistantUpdateParams::Calendly,
|
|
289
293
|
call_retry_config: Revox::AssistantUpdateParams::CallRetryConfig,
|
|
290
294
|
end_of_call_sentence: String,
|
|
291
295
|
faq_items: T::Array[Revox::AssistantUpdateParams::FaqItem],
|