revox 0.2.0 → 0.3.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 +10 -0
- data/README.md +1 -1
- data/lib/revox/client.rb +8 -0
- data/lib/revox/internal/type/base_model.rb +3 -3
- data/lib/revox/models/assistant_clone_params.rb +20 -0
- data/lib/revox/models/assistant_clone_response.rb +1594 -0
- data/lib/revox/models/auth_status_retrieve_params.rb +14 -0
- data/lib/revox/models/auth_status_retrieve_response.rb +17 -0
- data/lib/revox/models/call_cancel_params.rb +20 -0
- data/lib/revox/models/call_cancel_response.rb +16 -0
- data/lib/revox/models/call_create_response.rb +11 -1
- data/lib/revox/models/call_export_params.rb +205 -0
- data/lib/revox/models/call_export_response.rb +22 -0
- data/lib/revox/models/call_pause_params.rb +20 -0
- data/lib/revox/models/call_pause_response.rb +16 -0
- data/lib/revox/models/call_phone_history_params.rb +14 -0
- data/lib/revox/models/call_phone_history_response.rb +98 -0
- data/lib/revox/models/call_resume_params.rb +20 -0
- data/lib/revox/models/call_resume_response.rb +16 -0
- data/lib/revox/models/call_retrieve_response.rb +11 -1
- data/lib/revox/models/call_search_params.rb +171 -0
- data/lib/revox/models/call_search_response.rb +3114 -0
- data/lib/revox/models/campaign_get_rows_response.rb +11 -1
- data/lib/revox/models/campaign_launch_params.rb +20 -0
- data/lib/revox/models/campaign_launch_response.rb +2030 -0
- data/lib/revox/models/campaign_pause_params.rb +20 -0
- data/lib/revox/models/campaign_pause_response.rb +16 -0
- data/lib/revox/models/campaign_resume_params.rb +20 -0
- data/lib/revox/models/campaign_resume_response.rb +16 -0
- data/lib/revox/models/campaign_statistics_params.rb +20 -0
- data/lib/revox/models/campaign_statistics_response.rb +486 -0
- data/lib/revox/models/campaign_update_params.rb +234 -0
- data/lib/revox/models/campaign_update_response.rb +2030 -0
- data/lib/revox/models/phone_number_delete_params.rb +20 -0
- data/lib/revox/models/phone_number_delete_response.rb +16 -0
- data/lib/revox/models/phone_number_list_params.rb +14 -0
- data/lib/revox/models/phone_number_list_response.rb +1777 -0
- data/lib/revox/models/phone_number_update_params.rb +32 -0
- data/lib/revox/models/phone_number_update_response.rb +1777 -0
- data/lib/revox/models/user_retrieve_params.rb +14 -0
- data/lib/revox/models/user_retrieve_response.rb +99 -0
- data/lib/revox/models/voice_clone_params.rb +78 -0
- data/lib/revox/models/voice_clone_response.rb +40 -0
- data/lib/revox/models/voice_delete_params.rb +20 -0
- data/lib/revox/models/voice_delete_response.rb +16 -0
- data/lib/revox/models.rb +37 -1
- data/lib/revox/resources/assistants.rb +21 -0
- data/lib/revox/resources/auth_status.rb +32 -0
- data/lib/revox/resources/call.rb +145 -0
- data/lib/revox/resources/campaigns.rb +131 -0
- data/lib/revox/resources/phone_numbers.rb +74 -0
- data/lib/revox/resources/users.rb +17 -3
- data/lib/revox/resources/voices.rb +50 -0
- data/lib/revox/version.rb +1 -1
- data/lib/revox.rb +40 -5
- data/rbi/revox/client.rbi +6 -0
- data/rbi/revox/models/assistant_clone_params.rbi +33 -0
- data/rbi/revox/models/assistant_clone_response.rbi +3341 -0
- data/rbi/revox/models/auth_status_retrieve_params.rbi +27 -0
- data/rbi/revox/models/auth_status_retrieve_response.rbi +30 -0
- data/rbi/revox/models/call_cancel_params.rbi +33 -0
- data/rbi/revox/models/call_cancel_response.rbi +23 -0
- data/rbi/revox/models/call_create_response.rbi +12 -0
- data/rbi/revox/models/call_export_params.rbi +456 -0
- data/rbi/revox/models/call_export_response.rbi +26 -0
- data/rbi/revox/models/call_pause_params.rbi +31 -0
- data/rbi/revox/models/call_pause_response.rbi +23 -0
- data/rbi/revox/models/call_phone_history_params.rbi +27 -0
- data/rbi/revox/models/call_phone_history_response.rbi +224 -0
- data/rbi/revox/models/call_resume_params.rbi +33 -0
- data/rbi/revox/models/call_resume_response.rbi +23 -0
- data/rbi/revox/models/call_retrieve_response.rbi +12 -0
- data/rbi/revox/models/call_search_params.rbi +288 -0
- data/rbi/revox/models/call_search_response.rbi +6593 -0
- data/rbi/revox/models/campaign_get_rows_response.rbi +12 -0
- data/rbi/revox/models/campaign_launch_params.rbi +33 -0
- data/rbi/revox/models/campaign_launch_response.rbi +4170 -0
- data/rbi/revox/models/campaign_pause_params.rbi +33 -0
- data/rbi/revox/models/campaign_pause_response.rbi +23 -0
- data/rbi/revox/models/campaign_resume_params.rbi +33 -0
- data/rbi/revox/models/campaign_resume_response.rbi +23 -0
- data/rbi/revox/models/campaign_statistics_params.rbi +33 -0
- data/rbi/revox/models/campaign_statistics_response.rbi +1011 -0
- data/rbi/revox/models/campaign_update_params.rbi +431 -0
- data/rbi/revox/models/campaign_update_response.rbi +4170 -0
- data/rbi/revox/models/phone_number_delete_params.rbi +33 -0
- data/rbi/revox/models/phone_number_delete_response.rbi +26 -0
- data/rbi/revox/models/phone_number_list_params.rbi +27 -0
- data/rbi/revox/models/phone_number_list_response.rbi +3680 -0
- data/rbi/revox/models/phone_number_update_params.rbi +53 -0
- data/rbi/revox/models/phone_number_update_response.rbi +3683 -0
- data/rbi/revox/models/user_retrieve_params.rbi +27 -0
- data/rbi/revox/models/user_retrieve_response.rbi +140 -0
- data/rbi/revox/models/voice_clone_params.rbi +141 -0
- data/rbi/revox/models/voice_clone_response.rbi +53 -0
- data/rbi/revox/models/voice_delete_params.rbi +33 -0
- data/rbi/revox/models/voice_delete_response.rbi +23 -0
- data/rbi/revox/models.rbi +37 -1
- data/rbi/revox/resources/assistants.rbi +12 -0
- data/rbi/revox/resources/auth_status.rbi +21 -0
- data/rbi/revox/resources/call.rbi +107 -0
- data/rbi/revox/resources/campaigns.rbi +94 -0
- data/rbi/revox/resources/phone_numbers.rbi +43 -0
- data/rbi/revox/resources/users.rbi +8 -2
- data/rbi/revox/resources/voices.rbi +39 -0
- data/sig/revox/client.rbs +4 -0
- data/sig/revox/models/assistant_clone_params.rbs +20 -0
- data/sig/revox/models/assistant_clone_response.rbs +1318 -0
- data/sig/revox/models/auth_status_retrieve_params.rbs +15 -0
- data/sig/revox/models/auth_status_retrieve_response.rbs +13 -0
- data/sig/revox/models/call_cancel_params.rbs +20 -0
- data/sig/revox/models/call_cancel_response.rbs +13 -0
- data/sig/revox/models/call_create_response.rbs +5 -0
- data/sig/revox/models/call_export_params.rbs +234 -0
- data/sig/revox/models/call_export_response.rbs +15 -0
- data/sig/revox/models/call_pause_params.rbs +20 -0
- data/sig/revox/models/call_pause_response.rbs +13 -0
- data/sig/revox/models/call_phone_history_params.rbs +15 -0
- data/sig/revox/models/call_phone_history_response.rbs +102 -0
- data/sig/revox/models/call_resume_params.rbs +20 -0
- data/sig/revox/models/call_resume_response.rbs +13 -0
- data/sig/revox/models/call_retrieve_response.rbs +5 -0
- data/sig/revox/models/call_search_params.rbs +198 -0
- data/sig/revox/models/call_search_response.rbs +2654 -0
- data/sig/revox/models/campaign_get_rows_response.rbs +5 -0
- data/sig/revox/models/campaign_launch_params.rbs +20 -0
- data/sig/revox/models/campaign_launch_response.rbs +1694 -0
- data/sig/revox/models/campaign_pause_params.rbs +20 -0
- data/sig/revox/models/campaign_pause_response.rbs +13 -0
- data/sig/revox/models/campaign_resume_params.rbs +20 -0
- data/sig/revox/models/campaign_resume_response.rbs +13 -0
- data/sig/revox/models/campaign_statistics_params.rbs +20 -0
- data/sig/revox/models/campaign_statistics_response.rbs +458 -0
- data/sig/revox/models/campaign_update_params.rbs +203 -0
- data/sig/revox/models/campaign_update_response.rbs +1694 -0
- data/sig/revox/models/phone_number_delete_params.rbs +20 -0
- data/sig/revox/models/phone_number_delete_response.rbs +13 -0
- data/sig/revox/models/phone_number_list_params.rbs +15 -0
- data/sig/revox/models/phone_number_list_response.rbs +1462 -0
- data/sig/revox/models/phone_number_update_params.rbs +32 -0
- data/sig/revox/models/phone_number_update_response.rbs +1460 -0
- data/sig/revox/models/user_retrieve_params.rbs +14 -0
- data/sig/revox/models/user_retrieve_response.rbs +71 -0
- data/sig/revox/models/voice_clone_params.rbs +79 -0
- data/sig/revox/models/voice_clone_response.rbs +40 -0
- data/sig/revox/models/voice_delete_params.rbs +20 -0
- data/sig/revox/models/voice_delete_response.rbs +13 -0
- data/sig/revox/models.rbs +37 -1
- data/sig/revox/resources/assistants.rbs +5 -0
- data/sig/revox/resources/auth_status.rbs +11 -0
- data/sig/revox/resources/call.rbs +45 -0
- data/sig/revox/resources/campaigns.rbs +33 -0
- data/sig/revox/resources/phone_numbers.rbs +23 -0
- data/sig/revox/resources/users.rbs +3 -1
- data/sig/revox/resources/voices.rbs +13 -0
- metadata +121 -16
- data/lib/revox/models/users/me_retrieve_params.rb +0 -16
- data/lib/revox/models/users/me_retrieve_response.rb +0 -101
- data/lib/revox/models/users/me_update_params.rb +0 -22
- data/lib/revox/models/users/me_update_response.rb +0 -101
- data/lib/revox/resources/users/me.rb +0 -55
- data/rbi/revox/models/users/me_retrieve_params.rbi +0 -29
- data/rbi/revox/models/users/me_retrieve_response.rbi +0 -149
- data/rbi/revox/models/users/me_update_params.rbi +0 -43
- data/rbi/revox/models/users/me_update_response.rbi +0 -149
- data/rbi/revox/resources/users/me.rbi +0 -33
- data/sig/revox/models/users/me_retrieve_params.rbs +0 -16
- data/sig/revox/models/users/me_retrieve_response.rbs +0 -75
- data/sig/revox/models/users/me_update_params.rbs +0 -28
- data/sig/revox/models/users/me_update_response.rbs +0 -75
- 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
|
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
|
|
@@ -63,11 +79,31 @@ module Revox
|
|
|
63
79
|
|
|
64
80
|
CampaignGetRowsParams = Revox::Models::CampaignGetRowsParams
|
|
65
81
|
|
|
82
|
+
CampaignLaunchParams = Revox::Models::CampaignLaunchParams
|
|
83
|
+
|
|
66
84
|
CampaignListParams = Revox::Models::CampaignListParams
|
|
67
85
|
|
|
86
|
+
CampaignPauseParams = Revox::Models::CampaignPauseParams
|
|
87
|
+
|
|
88
|
+
CampaignResumeParams = Revox::Models::CampaignResumeParams
|
|
89
|
+
|
|
68
90
|
CampaignRetrieveParams = Revox::Models::CampaignRetrieveParams
|
|
69
91
|
|
|
70
|
-
|
|
92
|
+
CampaignStatisticsParams = Revox::Models::CampaignStatisticsParams
|
|
93
|
+
|
|
94
|
+
CampaignUpdateParams = Revox::Models::CampaignUpdateParams
|
|
95
|
+
|
|
96
|
+
PhoneNumberDeleteParams = Revox::Models::PhoneNumberDeleteParams
|
|
97
|
+
|
|
98
|
+
PhoneNumberListParams = Revox::Models::PhoneNumberListParams
|
|
99
|
+
|
|
100
|
+
PhoneNumberUpdateParams = Revox::Models::PhoneNumberUpdateParams
|
|
101
|
+
|
|
102
|
+
UserRetrieveParams = Revox::Models::UserRetrieveParams
|
|
103
|
+
|
|
104
|
+
VoiceCloneParams = Revox::Models::VoiceCloneParams
|
|
105
|
+
|
|
106
|
+
VoiceDeleteParams = Revox::Models::VoiceDeleteParams
|
|
71
107
|
|
|
72
108
|
VoiceListParams = Revox::Models::VoiceListParams
|
|
73
109
|
|
|
@@ -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
|
data/lib/revox/resources/call.rb
CHANGED
|
@@ -72,6 +72,151 @@ module Revox
|
|
|
72
72
|
)
|
|
73
73
|
end
|
|
74
74
|
|
|
75
|
+
# Cancel a running or scheduled call.
|
|
76
|
+
#
|
|
77
|
+
# @overload cancel(id, request_options: {})
|
|
78
|
+
#
|
|
79
|
+
# @param id [String]
|
|
80
|
+
# @param request_options [Revox::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
81
|
+
#
|
|
82
|
+
# @return [Revox::Models::CallCancelResponse]
|
|
83
|
+
#
|
|
84
|
+
# @see Revox::Models::CallCancelParams
|
|
85
|
+
def cancel(id, params = {})
|
|
86
|
+
@client.request(
|
|
87
|
+
method: :post,
|
|
88
|
+
path: ["call/%1$s/cancel", id],
|
|
89
|
+
model: Revox::Models::CallCancelResponse,
|
|
90
|
+
options: params[:request_options]
|
|
91
|
+
)
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Some parameter documentations has been truncated, see
|
|
95
|
+
# {Revox::Models::CallExportParams} for more details.
|
|
96
|
+
#
|
|
97
|
+
# Export a list of call attempts as a CSV file.
|
|
98
|
+
#
|
|
99
|
+
# @overload export(filters:, include_metadata: nil, include_structured_output_fields: nil, request_options: {})
|
|
100
|
+
#
|
|
101
|
+
# @param filters [Revox::Models::CallExportParams::Filters]
|
|
102
|
+
#
|
|
103
|
+
# @param include_metadata [Boolean] Whether to include the metadata in the CSV file. These are the fields you (optio
|
|
104
|
+
#
|
|
105
|
+
# @param include_structured_output_fields [Boolean] Whether to include the structured output fields in the CSV file. These are gener
|
|
106
|
+
#
|
|
107
|
+
# @param request_options [Revox::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
108
|
+
#
|
|
109
|
+
# @return [Revox::Models::CallExportResponse]
|
|
110
|
+
#
|
|
111
|
+
# @see Revox::Models::CallExportParams
|
|
112
|
+
def export(params)
|
|
113
|
+
parsed, options = Revox::CallExportParams.dump_request(params)
|
|
114
|
+
@client.request(
|
|
115
|
+
method: :post,
|
|
116
|
+
path: "call/export",
|
|
117
|
+
body: parsed,
|
|
118
|
+
model: Revox::Models::CallExportResponse,
|
|
119
|
+
options: options
|
|
120
|
+
)
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Pause a call's retry loop. The current in-progress attempt (if any) will finish,
|
|
124
|
+
# but no new attempts will be started until the call is resumed.
|
|
125
|
+
#
|
|
126
|
+
# @overload pause(id, request_options: {})
|
|
127
|
+
#
|
|
128
|
+
# @param id [String]
|
|
129
|
+
# @param request_options [Revox::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
130
|
+
#
|
|
131
|
+
# @return [Revox::Models::CallPauseResponse]
|
|
132
|
+
#
|
|
133
|
+
# @see Revox::Models::CallPauseParams
|
|
134
|
+
def pause(id, params = {})
|
|
135
|
+
@client.request(
|
|
136
|
+
method: :post,
|
|
137
|
+
path: ["call/%1$s/pause", id],
|
|
138
|
+
model: Revox::Models::CallPauseResponse,
|
|
139
|
+
options: params[:request_options]
|
|
140
|
+
)
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Returns a map of phone numbers to the number of calls and associated campaigns
|
|
144
|
+
# across the entire organization. Useful for detecting contacts that have already
|
|
145
|
+
# been reached.
|
|
146
|
+
#
|
|
147
|
+
# @overload phone_history(request_options: {})
|
|
148
|
+
#
|
|
149
|
+
# @param request_options [Revox::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
150
|
+
#
|
|
151
|
+
# @return [Revox::Models::CallPhoneHistoryResponse]
|
|
152
|
+
#
|
|
153
|
+
# @see Revox::Models::CallPhoneHistoryParams
|
|
154
|
+
def phone_history(params = {})
|
|
155
|
+
@client.request(
|
|
156
|
+
method: :get,
|
|
157
|
+
path: "calls/phone-history",
|
|
158
|
+
model: Revox::Models::CallPhoneHistoryResponse,
|
|
159
|
+
options: params[:request_options]
|
|
160
|
+
)
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Resume a previously paused call. The retry loop will continue from where it left
|
|
164
|
+
# off.
|
|
165
|
+
#
|
|
166
|
+
# @overload resume(id, request_options: {})
|
|
167
|
+
#
|
|
168
|
+
# @param id [String]
|
|
169
|
+
# @param request_options [Revox::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
170
|
+
#
|
|
171
|
+
# @return [Revox::Models::CallResumeResponse]
|
|
172
|
+
#
|
|
173
|
+
# @see Revox::Models::CallResumeParams
|
|
174
|
+
def resume(id, params = {})
|
|
175
|
+
@client.request(
|
|
176
|
+
method: :post,
|
|
177
|
+
path: ["call/%1$s/resume", id],
|
|
178
|
+
model: Revox::Models::CallResumeResponse,
|
|
179
|
+
options: params[:request_options]
|
|
180
|
+
)
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Retrieve a paginated list of call attempts. Each entry includes the call status,
|
|
184
|
+
# phone number, assistant used, transcript, and timestamps. Use the page and
|
|
185
|
+
# page_size query parameters to navigate through results.
|
|
186
|
+
#
|
|
187
|
+
# @overload search(assignee_ids:, assistant_ids:, campaign_ids:, directions:, from_phone_numbers:, outcomes:, page:, page_size:, results:, statuses:, call_ids: nil, query: nil, sort_by: nil, sort_direction: nil, to_phone_number: nil, request_options: {})
|
|
188
|
+
#
|
|
189
|
+
# @param assignee_ids [Array<String>]
|
|
190
|
+
# @param assistant_ids [Array<String>]
|
|
191
|
+
# @param campaign_ids [Array<String>]
|
|
192
|
+
# @param directions [Array<Symbol, Revox::Models::CallSearchParams::Direction>]
|
|
193
|
+
# @param from_phone_numbers [Array<String>]
|
|
194
|
+
# @param outcomes [Array<Symbol, Revox::Models::CallSearchParams::Outcome>]
|
|
195
|
+
# @param page [Integer]
|
|
196
|
+
# @param page_size [Integer]
|
|
197
|
+
# @param results [Array<Symbol, Revox::Models::CallSearchParams::Result>]
|
|
198
|
+
# @param statuses [Array<Symbol, Revox::Models::CallSearchParams::Status>]
|
|
199
|
+
# @param call_ids [Array<String>]
|
|
200
|
+
# @param query [String]
|
|
201
|
+
# @param sort_by [String]
|
|
202
|
+
# @param sort_direction [Symbol, Revox::Models::CallSearchParams::SortDirection]
|
|
203
|
+
# @param to_phone_number [String]
|
|
204
|
+
# @param request_options [Revox::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
205
|
+
#
|
|
206
|
+
# @return [Revox::Models::CallSearchResponse]
|
|
207
|
+
#
|
|
208
|
+
# @see Revox::Models::CallSearchParams
|
|
209
|
+
def search(params)
|
|
210
|
+
parsed, options = Revox::CallSearchParams.dump_request(params)
|
|
211
|
+
@client.request(
|
|
212
|
+
method: :post,
|
|
213
|
+
path: "call/search",
|
|
214
|
+
body: parsed,
|
|
215
|
+
model: Revox::Models::CallSearchResponse,
|
|
216
|
+
options: options
|
|
217
|
+
)
|
|
218
|
+
end
|
|
219
|
+
|
|
75
220
|
# @api private
|
|
76
221
|
#
|
|
77
222
|
# @param client [Revox::Client]
|
|
@@ -65,6 +65,49 @@ module Revox
|
|
|
65
65
|
)
|
|
66
66
|
end
|
|
67
67
|
|
|
68
|
+
# Some parameter documentations has been truncated, see
|
|
69
|
+
# {Revox::Models::CampaignUpdateParams} for more details.
|
|
70
|
+
#
|
|
71
|
+
# Update editable fields on a campaign. Draft campaigns support updating all
|
|
72
|
+
# fields including assistant, contacts, and settings. Non-draft campaigns only
|
|
73
|
+
# support renaming.
|
|
74
|
+
#
|
|
75
|
+
# @overload update(id, assistant_id: nil, call_retry_config: nil, contacts: nil, from_phone_number: nil, max_concurrent_calls: nil, name: nil, scheduled_at: nil, type: nil, request_options: {})
|
|
76
|
+
#
|
|
77
|
+
# @param id [String]
|
|
78
|
+
#
|
|
79
|
+
# @param assistant_id [String] The ID of the assistant to use (draft only)
|
|
80
|
+
#
|
|
81
|
+
# @param call_retry_config [Revox::Models::CampaignUpdateParams::CallRetryConfig, nil] Configuration for call retry behavior including time windows, delays, and max it
|
|
82
|
+
#
|
|
83
|
+
# @param contacts [Array<Revox::Models::CampaignUpdateParams::Contact>] Replace contact list (draft only)
|
|
84
|
+
#
|
|
85
|
+
# @param from_phone_number [String, nil] The phone number to use for outbound calls (draft only)
|
|
86
|
+
#
|
|
87
|
+
# @param max_concurrent_calls [Float, nil] Maximum concurrent calls (draft only)
|
|
88
|
+
#
|
|
89
|
+
# @param name [String] Campaign display name
|
|
90
|
+
#
|
|
91
|
+
# @param scheduled_at [Time, Object, nil] Scheduled start time (draft only)
|
|
92
|
+
#
|
|
93
|
+
# @param type [Symbol, Revox::Models::CampaignUpdateParams::Type] Campaign type (draft only)
|
|
94
|
+
#
|
|
95
|
+
# @param request_options [Revox::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
96
|
+
#
|
|
97
|
+
# @return [Revox::Models::CampaignUpdateResponse]
|
|
98
|
+
#
|
|
99
|
+
# @see Revox::Models::CampaignUpdateParams
|
|
100
|
+
def update(id, params = {})
|
|
101
|
+
parsed, options = Revox::CampaignUpdateParams.dump_request(params)
|
|
102
|
+
@client.request(
|
|
103
|
+
method: :patch,
|
|
104
|
+
path: ["campaigns/%1$s", id],
|
|
105
|
+
body: parsed,
|
|
106
|
+
model: Revox::Models::CampaignUpdateResponse,
|
|
107
|
+
options: options
|
|
108
|
+
)
|
|
109
|
+
end
|
|
110
|
+
|
|
68
111
|
# Retrieve all campaigns for your organization, including both active and
|
|
69
112
|
# completed ones.
|
|
70
113
|
#
|
|
@@ -165,6 +208,94 @@ module Revox
|
|
|
165
208
|
)
|
|
166
209
|
end
|
|
167
210
|
|
|
211
|
+
# Launch a previously saved draft campaign. This starts all calls immediately (or
|
|
212
|
+
# queues them if scheduled_at is set). The campaign must be in draft status.
|
|
213
|
+
#
|
|
214
|
+
# @overload launch(id, request_options: {})
|
|
215
|
+
#
|
|
216
|
+
# @param id [String]
|
|
217
|
+
# @param request_options [Revox::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
218
|
+
#
|
|
219
|
+
# @return [Revox::Models::CampaignLaunchResponse]
|
|
220
|
+
#
|
|
221
|
+
# @see Revox::Models::CampaignLaunchParams
|
|
222
|
+
def launch(id, params = {})
|
|
223
|
+
@client.request(
|
|
224
|
+
method: :post,
|
|
225
|
+
path: ["campaigns/%1$s/launch", id],
|
|
226
|
+
model: Revox::Models::CampaignLaunchResponse,
|
|
227
|
+
options: params[:request_options]
|
|
228
|
+
)
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
# Pause a running campaign so no further calls are placed. In-progress calls are
|
|
232
|
+
# allowed to finish; pending and scheduled calls are held until the campaign is
|
|
233
|
+
# resumed. Scheduled retry timers keep counting down, so a call resumed before its
|
|
234
|
+
# time fires on schedule, while one resumed after its time fires at the next
|
|
235
|
+
# available calling window.
|
|
236
|
+
#
|
|
237
|
+
# @overload pause(id, request_options: {})
|
|
238
|
+
#
|
|
239
|
+
# @param id [String]
|
|
240
|
+
# @param request_options [Revox::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
241
|
+
#
|
|
242
|
+
# @return [Revox::Models::CampaignPauseResponse]
|
|
243
|
+
#
|
|
244
|
+
# @see Revox::Models::CampaignPauseParams
|
|
245
|
+
def pause(id, params = {})
|
|
246
|
+
@client.request(
|
|
247
|
+
method: :post,
|
|
248
|
+
path: ["campaigns/%1$s/pause", id],
|
|
249
|
+
model: Revox::Models::CampaignPauseResponse,
|
|
250
|
+
options: params[:request_options]
|
|
251
|
+
)
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
# Resume a paused campaign. Held calls continue from where they left off; calls
|
|
255
|
+
# whose scheduled time passed during the pause are placed at the next available
|
|
256
|
+
# calling window.
|
|
257
|
+
#
|
|
258
|
+
# @overload resume(id, request_options: {})
|
|
259
|
+
#
|
|
260
|
+
# @param id [String]
|
|
261
|
+
# @param request_options [Revox::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
262
|
+
#
|
|
263
|
+
# @return [Revox::Models::CampaignResumeResponse]
|
|
264
|
+
#
|
|
265
|
+
# @see Revox::Models::CampaignResumeParams
|
|
266
|
+
def resume(id, params = {})
|
|
267
|
+
@client.request(
|
|
268
|
+
method: :post,
|
|
269
|
+
path: ["campaigns/%1$s/resume", id],
|
|
270
|
+
model: Revox::Models::CampaignResumeResponse,
|
|
271
|
+
options: params[:request_options]
|
|
272
|
+
)
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
# Retrieve the "Statistiques" report for a campaign: the four-tile cascade funnel
|
|
276
|
+
# (appelés → eus en ligne → réels échanges → leads chauds), two secondary tiles,
|
|
277
|
+
# the distribution of exchanges by outcome, the list of hot leads, and
|
|
278
|
+
# data-extraction coverage. All counts are over distinct E.164-normalized phone
|
|
279
|
+
# numbers, and the outcome-based categories derive exclusively from calls.outcome.
|
|
280
|
+
# Cascade percentages are null when their denominator is zero.
|
|
281
|
+
#
|
|
282
|
+
# @overload statistics(id, request_options: {})
|
|
283
|
+
#
|
|
284
|
+
# @param id [String]
|
|
285
|
+
# @param request_options [Revox::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
286
|
+
#
|
|
287
|
+
# @return [Revox::Models::CampaignStatisticsResponse]
|
|
288
|
+
#
|
|
289
|
+
# @see Revox::Models::CampaignStatisticsParams
|
|
290
|
+
def statistics(id, params = {})
|
|
291
|
+
@client.request(
|
|
292
|
+
method: :get,
|
|
293
|
+
path: ["campaigns/%1$s/statistics", id],
|
|
294
|
+
model: Revox::Models::CampaignStatisticsResponse,
|
|
295
|
+
options: params[:request_options]
|
|
296
|
+
)
|
|
297
|
+
end
|
|
298
|
+
|
|
168
299
|
# @api private
|
|
169
300
|
#
|
|
170
301
|
# @param client [Revox::Client]
|