telnyx 5.72.1 → 5.74.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 +16 -0
- data/README.md +1 -1
- data/lib/telnyx/models/call_dial_params.rb +57 -1
- data/lib/telnyx/models/session_analysis_retrieve_params.rb +7 -2
- data/lib/telnyx/models/session_analysis_retrieve_response.rb +1 -25
- data/lib/telnyx/models/voice_clone_create_from_upload_params.rb +381 -5
- data/lib/telnyx/resources/calls.rb +7 -1
- data/lib/telnyx/resources/session_analysis.rb +4 -1
- data/lib/telnyx/resources/voice_clones.rb +7 -3
- data/lib/telnyx/version.rb +1 -1
- data/rbi/telnyx/models/call_dial_params.rbi +125 -0
- data/rbi/telnyx/models/session_analysis_retrieve_params.rbi +6 -2
- data/rbi/telnyx/models/session_analysis_retrieve_response.rbi +3 -27
- data/rbi/telnyx/models/voice_clone_create_from_upload_params.rbi +743 -5
- data/rbi/telnyx/resources/calls.rbi +19 -0
- data/rbi/telnyx/resources/session_analysis.rbi +3 -1
- data/rbi/telnyx/resources/voice_clones.rbi +12 -2
- data/sig/telnyx/models/call_dial_params.rbs +49 -1
- data/sig/telnyx/models/session_analysis_retrieve_response.rbs +3 -18
- data/sig/telnyx/models/voice_clone_create_from_upload_params.rbs +283 -4
- data/sig/telnyx/resources/calls.rbs +3 -0
- data/sig/telnyx/resources/voice_clones.rbs +1 -1
- metadata +2 -2
|
@@ -113,13 +113,17 @@ module Telnyx
|
|
|
113
113
|
)
|
|
114
114
|
end
|
|
115
115
|
|
|
116
|
+
# Some parameter documentations has been truncated, see
|
|
117
|
+
# {Telnyx::Models::VoiceCloneCreateFromUploadParams} for more details.
|
|
118
|
+
#
|
|
116
119
|
# Creates a new voice clone by uploading an audio file directly. Supported
|
|
117
120
|
# formats: WAV, MP3, FLAC, OGG, M4A. For best results, provide 5–10 seconds of
|
|
118
121
|
# clear speech. Maximum file size: 5MB for Telnyx, 20MB for Minimax.
|
|
119
122
|
#
|
|
120
|
-
# @overload create_from_upload(
|
|
123
|
+
# @overload create_from_upload(params:, request_options: {})
|
|
124
|
+
#
|
|
125
|
+
# @param params [Telnyx::Models::VoiceCloneCreateFromUploadParams::Params::TelnyxQwen3TtsClone, Telnyx::Models::VoiceCloneCreateFromUploadParams::Params::TelnyxUltraClone, Telnyx::Models::VoiceCloneCreateFromUploadParams::Params::MinimaxClone] Multipart form data for creating a voice clone from a direct audio upload. Maxim
|
|
121
126
|
#
|
|
122
|
-
# @param upload_params [Object]
|
|
123
127
|
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
124
128
|
#
|
|
125
129
|
# @return [Telnyx::Models::VoiceCloneCreateFromUploadResponse]
|
|
@@ -131,7 +135,7 @@ module Telnyx
|
|
|
131
135
|
method: :post,
|
|
132
136
|
path: "voice_clones/from_upload",
|
|
133
137
|
headers: {"content-type" => "multipart/form-data"},
|
|
134
|
-
body: parsed[:
|
|
138
|
+
body: parsed[:params],
|
|
135
139
|
model: Telnyx::Models::VoiceCloneCreateFromUploadResponse,
|
|
136
140
|
options: options
|
|
137
141
|
)
|
data/lib/telnyx/version.rb
CHANGED
|
@@ -541,6 +541,29 @@ module Telnyx
|
|
|
541
541
|
end
|
|
542
542
|
attr_writer :transcription_config
|
|
543
543
|
|
|
544
|
+
# A map of event types to retry policies. Each retry policy contains an array of
|
|
545
|
+
# `retries_ms` specifying the delays between retry attempts in milliseconds.
|
|
546
|
+
# Maximum 5 retries, total delay cannot exceed 60 seconds.
|
|
547
|
+
sig do
|
|
548
|
+
returns(
|
|
549
|
+
T.nilable(
|
|
550
|
+
T::Hash[Symbol, Telnyx::CallDialParams::WebhookRetriesPolicy]
|
|
551
|
+
)
|
|
552
|
+
)
|
|
553
|
+
end
|
|
554
|
+
attr_reader :webhook_retries_policies
|
|
555
|
+
|
|
556
|
+
sig do
|
|
557
|
+
params(
|
|
558
|
+
webhook_retries_policies:
|
|
559
|
+
T::Hash[
|
|
560
|
+
Symbol,
|
|
561
|
+
Telnyx::CallDialParams::WebhookRetriesPolicy::OrHash
|
|
562
|
+
]
|
|
563
|
+
).void
|
|
564
|
+
end
|
|
565
|
+
attr_writer :webhook_retries_policies
|
|
566
|
+
|
|
544
567
|
# Use this field to override the URL for which Telnyx will send subsequent
|
|
545
568
|
# webhooks to for this call.
|
|
546
569
|
sig { returns(T.nilable(String)) }
|
|
@@ -562,6 +585,30 @@ module Telnyx
|
|
|
562
585
|
end
|
|
563
586
|
attr_writer :webhook_url_method
|
|
564
587
|
|
|
588
|
+
# A map of event types to webhook URLs. When an event of the specified type
|
|
589
|
+
# occurs, the webhook URL associated with that event type will be called instead
|
|
590
|
+
# of the default webhook URL. Events not mapped here will use the default webhook
|
|
591
|
+
# URL.
|
|
592
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
593
|
+
attr_reader :webhook_urls
|
|
594
|
+
|
|
595
|
+
sig { params(webhook_urls: T::Hash[Symbol, String]).void }
|
|
596
|
+
attr_writer :webhook_urls
|
|
597
|
+
|
|
598
|
+
# HTTP request method to invoke `webhook_urls`.
|
|
599
|
+
sig do
|
|
600
|
+
returns(T.nilable(Telnyx::CallDialParams::WebhookURLsMethod::OrSymbol))
|
|
601
|
+
end
|
|
602
|
+
attr_reader :webhook_urls_method
|
|
603
|
+
|
|
604
|
+
sig do
|
|
605
|
+
params(
|
|
606
|
+
webhook_urls_method:
|
|
607
|
+
Telnyx::CallDialParams::WebhookURLsMethod::OrSymbol
|
|
608
|
+
).void
|
|
609
|
+
end
|
|
610
|
+
attr_writer :webhook_urls_method
|
|
611
|
+
|
|
565
612
|
sig do
|
|
566
613
|
params(
|
|
567
614
|
connection_id: String,
|
|
@@ -625,9 +672,17 @@ module Telnyx
|
|
|
625
672
|
transcription: T::Boolean,
|
|
626
673
|
transcription_config:
|
|
627
674
|
Telnyx::Calls::TranscriptionStartRequest::OrHash,
|
|
675
|
+
webhook_retries_policies:
|
|
676
|
+
T::Hash[
|
|
677
|
+
Symbol,
|
|
678
|
+
Telnyx::CallDialParams::WebhookRetriesPolicy::OrHash
|
|
679
|
+
],
|
|
628
680
|
webhook_url: String,
|
|
629
681
|
webhook_url_method:
|
|
630
682
|
Telnyx::CallDialParams::WebhookURLMethod::OrSymbol,
|
|
683
|
+
webhook_urls: T::Hash[Symbol, String],
|
|
684
|
+
webhook_urls_method:
|
|
685
|
+
Telnyx::CallDialParams::WebhookURLsMethod::OrSymbol,
|
|
631
686
|
request_options: Telnyx::RequestOptions::OrHash
|
|
632
687
|
).returns(T.attached_class)
|
|
633
688
|
end
|
|
@@ -810,11 +865,22 @@ module Telnyx
|
|
|
810
865
|
# Enable transcription upon call answer. The default value is false.
|
|
811
866
|
transcription: nil,
|
|
812
867
|
transcription_config: nil,
|
|
868
|
+
# A map of event types to retry policies. Each retry policy contains an array of
|
|
869
|
+
# `retries_ms` specifying the delays between retry attempts in milliseconds.
|
|
870
|
+
# Maximum 5 retries, total delay cannot exceed 60 seconds.
|
|
871
|
+
webhook_retries_policies: nil,
|
|
813
872
|
# Use this field to override the URL for which Telnyx will send subsequent
|
|
814
873
|
# webhooks to for this call.
|
|
815
874
|
webhook_url: nil,
|
|
816
875
|
# HTTP request type used for `webhook_url`.
|
|
817
876
|
webhook_url_method: nil,
|
|
877
|
+
# A map of event types to webhook URLs. When an event of the specified type
|
|
878
|
+
# occurs, the webhook URL associated with that event type will be called instead
|
|
879
|
+
# of the default webhook URL. Events not mapped here will use the default webhook
|
|
880
|
+
# URL.
|
|
881
|
+
webhook_urls: nil,
|
|
882
|
+
# HTTP request method to invoke `webhook_urls`.
|
|
883
|
+
webhook_urls_method: nil,
|
|
818
884
|
request_options: {}
|
|
819
885
|
)
|
|
820
886
|
end
|
|
@@ -883,9 +949,14 @@ module Telnyx
|
|
|
883
949
|
timeout_secs: Integer,
|
|
884
950
|
transcription: T::Boolean,
|
|
885
951
|
transcription_config: Telnyx::Calls::TranscriptionStartRequest,
|
|
952
|
+
webhook_retries_policies:
|
|
953
|
+
T::Hash[Symbol, Telnyx::CallDialParams::WebhookRetriesPolicy],
|
|
886
954
|
webhook_url: String,
|
|
887
955
|
webhook_url_method:
|
|
888
956
|
Telnyx::CallDialParams::WebhookURLMethod::OrSymbol,
|
|
957
|
+
webhook_urls: T::Hash[Symbol, String],
|
|
958
|
+
webhook_urls_method:
|
|
959
|
+
Telnyx::CallDialParams::WebhookURLsMethod::OrSymbol,
|
|
889
960
|
request_options: Telnyx::RequestOptions
|
|
890
961
|
}
|
|
891
962
|
)
|
|
@@ -1764,6 +1835,36 @@ module Telnyx
|
|
|
1764
1835
|
end
|
|
1765
1836
|
end
|
|
1766
1837
|
|
|
1838
|
+
class WebhookRetriesPolicy < Telnyx::Internal::Type::BaseModel
|
|
1839
|
+
OrHash =
|
|
1840
|
+
T.type_alias do
|
|
1841
|
+
T.any(
|
|
1842
|
+
Telnyx::CallDialParams::WebhookRetriesPolicy,
|
|
1843
|
+
Telnyx::Internal::AnyHash
|
|
1844
|
+
)
|
|
1845
|
+
end
|
|
1846
|
+
|
|
1847
|
+
# Array of delays in milliseconds between retry attempts. Total sum cannot exceed
|
|
1848
|
+
# 60000ms.
|
|
1849
|
+
sig { returns(T.nilable(T::Array[Integer])) }
|
|
1850
|
+
attr_reader :retries_ms
|
|
1851
|
+
|
|
1852
|
+
sig { params(retries_ms: T::Array[Integer]).void }
|
|
1853
|
+
attr_writer :retries_ms
|
|
1854
|
+
|
|
1855
|
+
sig { params(retries_ms: T::Array[Integer]).returns(T.attached_class) }
|
|
1856
|
+
def self.new(
|
|
1857
|
+
# Array of delays in milliseconds between retry attempts. Total sum cannot exceed
|
|
1858
|
+
# 60000ms.
|
|
1859
|
+
retries_ms: nil
|
|
1860
|
+
)
|
|
1861
|
+
end
|
|
1862
|
+
|
|
1863
|
+
sig { override.returns({ retries_ms: T::Array[Integer] }) }
|
|
1864
|
+
def to_hash
|
|
1865
|
+
end
|
|
1866
|
+
end
|
|
1867
|
+
|
|
1767
1868
|
# HTTP request type used for `webhook_url`.
|
|
1768
1869
|
module WebhookURLMethod
|
|
1769
1870
|
extend Telnyx::Internal::Type::Enum
|
|
@@ -1787,6 +1888,30 @@ module Telnyx
|
|
|
1787
1888
|
def self.values
|
|
1788
1889
|
end
|
|
1789
1890
|
end
|
|
1891
|
+
|
|
1892
|
+
# HTTP request method to invoke `webhook_urls`.
|
|
1893
|
+
module WebhookURLsMethod
|
|
1894
|
+
extend Telnyx::Internal::Type::Enum
|
|
1895
|
+
|
|
1896
|
+
TaggedSymbol =
|
|
1897
|
+
T.type_alias do
|
|
1898
|
+
T.all(Symbol, Telnyx::CallDialParams::WebhookURLsMethod)
|
|
1899
|
+
end
|
|
1900
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1901
|
+
|
|
1902
|
+
POST =
|
|
1903
|
+
T.let(:POST, Telnyx::CallDialParams::WebhookURLsMethod::TaggedSymbol)
|
|
1904
|
+
GET =
|
|
1905
|
+
T.let(:GET, Telnyx::CallDialParams::WebhookURLsMethod::TaggedSymbol)
|
|
1906
|
+
|
|
1907
|
+
sig do
|
|
1908
|
+
override.returns(
|
|
1909
|
+
T::Array[Telnyx::CallDialParams::WebhookURLsMethod::TaggedSymbol]
|
|
1910
|
+
)
|
|
1911
|
+
end
|
|
1912
|
+
def self.values
|
|
1913
|
+
end
|
|
1914
|
+
end
|
|
1790
1915
|
end
|
|
1791
1916
|
end
|
|
1792
1917
|
end
|
|
@@ -20,7 +20,9 @@ module Telnyx
|
|
|
20
20
|
sig { returns(String) }
|
|
21
21
|
attr_accessor :event_id
|
|
22
22
|
|
|
23
|
-
# ISO 8601 timestamp to narrow index selection for faster lookups.
|
|
23
|
+
# ISO 8601 timestamp or date to narrow index selection for faster lookups. Accepts
|
|
24
|
+
# full datetime (e.g., 2026-03-17T10:00:00Z) or date-only format (e.g.,
|
|
25
|
+
# 2026-03-17).
|
|
24
26
|
sig { returns(T.nilable(Time)) }
|
|
25
27
|
attr_reader :date_time
|
|
26
28
|
|
|
@@ -70,7 +72,9 @@ module Telnyx
|
|
|
70
72
|
def self.new(
|
|
71
73
|
record_type:,
|
|
72
74
|
event_id:,
|
|
73
|
-
# ISO 8601 timestamp to narrow index selection for faster lookups.
|
|
75
|
+
# ISO 8601 timestamp or date to narrow index selection for faster lookups. Accepts
|
|
76
|
+
# full datetime (e.g., 2026-03-17T10:00:00Z) or date-only format (e.g.,
|
|
77
|
+
# 2026-03-17).
|
|
74
78
|
date_time: nil,
|
|
75
79
|
# Controls what data to expand on each event node.
|
|
76
80
|
expand: nil,
|
|
@@ -21,10 +21,6 @@ module Telnyx
|
|
|
21
21
|
end
|
|
22
22
|
attr_writer :cost
|
|
23
23
|
|
|
24
|
-
# When the session started.
|
|
25
|
-
sig { returns(Time) }
|
|
26
|
-
attr_accessor :created_at
|
|
27
|
-
|
|
28
24
|
sig { returns(Telnyx::Models::SessionAnalysisRetrieveResponse::Meta) }
|
|
29
25
|
attr_reader :meta
|
|
30
26
|
|
|
@@ -45,37 +41,20 @@ module Telnyx
|
|
|
45
41
|
sig { returns(String) }
|
|
46
42
|
attr_accessor :session_id
|
|
47
43
|
|
|
48
|
-
# Analysis status (e.g. "completed").
|
|
49
|
-
sig { returns(String) }
|
|
50
|
-
attr_accessor :status
|
|
51
|
-
|
|
52
|
-
# When the session completed.
|
|
53
|
-
sig { returns(T.nilable(Time)) }
|
|
54
|
-
attr_accessor :completed_at
|
|
55
|
-
|
|
56
44
|
sig do
|
|
57
45
|
params(
|
|
58
46
|
cost: Telnyx::Models::SessionAnalysisRetrieveResponse::Cost::OrHash,
|
|
59
|
-
created_at: Time,
|
|
60
47
|
meta: Telnyx::Models::SessionAnalysisRetrieveResponse::Meta::OrHash,
|
|
61
48
|
root: Telnyx::EventNode::OrHash,
|
|
62
|
-
session_id: String
|
|
63
|
-
status: String,
|
|
64
|
-
completed_at: T.nilable(Time)
|
|
49
|
+
session_id: String
|
|
65
50
|
).returns(T.attached_class)
|
|
66
51
|
end
|
|
67
52
|
def self.new(
|
|
68
53
|
cost:,
|
|
69
|
-
# When the session started.
|
|
70
|
-
created_at:,
|
|
71
54
|
meta:,
|
|
72
55
|
root:,
|
|
73
56
|
# Identifier for the analyzed session.
|
|
74
|
-
session_id
|
|
75
|
-
# Analysis status (e.g. "completed").
|
|
76
|
-
status:,
|
|
77
|
-
# When the session completed.
|
|
78
|
-
completed_at: nil
|
|
57
|
+
session_id:
|
|
79
58
|
)
|
|
80
59
|
end
|
|
81
60
|
|
|
@@ -83,12 +62,9 @@ module Telnyx
|
|
|
83
62
|
override.returns(
|
|
84
63
|
{
|
|
85
64
|
cost: Telnyx::Models::SessionAnalysisRetrieveResponse::Cost,
|
|
86
|
-
created_at: Time,
|
|
87
65
|
meta: Telnyx::Models::SessionAnalysisRetrieveResponse::Meta,
|
|
88
66
|
root: Telnyx::EventNode,
|
|
89
|
-
session_id: String
|
|
90
|
-
status: String,
|
|
91
|
-
completed_at: T.nilable(Time)
|
|
67
|
+
session_id: String
|
|
92
68
|
}
|
|
93
69
|
)
|
|
94
70
|
end
|