telnyx 5.156.0 → 5.158.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 +22 -0
- data/README.md +1 -1
- data/lib/telnyx/models/ai/anthropic/v1_messages_params.rb +209 -0
- data/lib/telnyx/models/ai/anthropic/v1_messages_response.rb +12 -0
- data/lib/telnyx/models/ai/assistant_create_params.rb +2 -2
- data/lib/telnyx/models/ai/assistant_tool.rb +25 -1
- data/lib/telnyx/models/ai/assistant_update_params.rb +2 -2
- data/lib/telnyx/models/ai/assistants/update_assistant.rb +2 -2
- data/lib/telnyx/models/ai/conversations/conversation_insight_retrieve_aggregates_params.rb +103 -0
- data/lib/telnyx/models/ai/conversations/conversation_insight_retrieve_aggregates_response.rb +54 -0
- data/lib/telnyx/models/ai/inference_embedding.rb +6 -6
- data/lib/telnyx/models/ai/pay_tool_params.rb +46 -0
- data/lib/telnyx/models/ai/tool_create_params.rb +7 -1
- data/lib/telnyx/models/ai/tool_update_params.rb +7 -1
- data/lib/telnyx/models/ai/transcription_settings.rb +3 -3
- data/lib/telnyx/models/call_answered.rb +35 -3
- data/lib/telnyx/models/call_dial_params.rb +13 -1
- data/lib/telnyx/models/call_hangup.rb +35 -3
- data/lib/telnyx/models/call_initiated.rb +35 -3
- data/lib/telnyx/models/calls/transcription_config.rb +8 -4
- data/lib/telnyx/models/calls/transcription_engine_parakeet_config.rb +1 -1
- data/lib/telnyx/models/doc_reqs_requirement.rb +29 -4
- data/lib/telnyx/models/inbound_message.rb +278 -28
- data/lib/telnyx/models/inbound_message_webhook_event.rb +70 -3
- data/lib/telnyx/models/managed_account_list_params.rb +45 -3
- data/lib/telnyx/models/requirement_list_params.rb +10 -1
- data/lib/telnyx/models/requirement_retrieve_params.rb +14 -1
- data/lib/telnyx/models/speech_to_text_retrieve_transcription_params.rb +1 -1
- data/lib/telnyx/models/storage/cloudf_create_params.rb +56 -0
- data/lib/telnyx/models/storage/cloudf_delete_params.rb +22 -0
- data/lib/telnyx/models/storage/cloudf_list_params.rb +109 -0
- data/lib/telnyx/models/storage/cloudf_list_response.rb +165 -0
- data/lib/telnyx/models/storage/cloudf_retrieve_params.rb +22 -0
- data/lib/telnyx/models/storage/cloudf_update_params.rb +36 -0
- data/lib/telnyx/models/storage/cloudfs/action_rotate_meta_token_params.rb +30 -0
- data/lib/telnyx/models/storage/cloudfs_filesystem_detail_response_wrapper.rb +129 -0
- data/lib/telnyx/models/storage/cloudfs_filesystem_response_wrapper.rb +129 -0
- data/lib/telnyx/models/storage/cloudfs_filesystem_status.rb +28 -0
- data/lib/telnyx/models/verify_profile.rb +2 -2
- data/lib/telnyx/models/verify_profile_create_params.rb +2 -2
- data/lib/telnyx/models/verify_profile_update_params.rb +2 -2
- data/lib/telnyx/resources/ai/anthropic/v1.rb +91 -0
- data/lib/telnyx/resources/ai/anthropic.rb +20 -0
- data/lib/telnyx/resources/ai/assistants/versions.rb +1 -1
- data/lib/telnyx/resources/ai/assistants.rb +2 -2
- data/lib/telnyx/resources/ai/conversations/conversation_insights.rb +55 -0
- data/lib/telnyx/resources/ai/conversations.rb +5 -0
- data/lib/telnyx/resources/ai/tools.rb +5 -2
- data/lib/telnyx/resources/ai.rb +4 -0
- data/lib/telnyx/resources/calls.rb +3 -1
- data/lib/telnyx/resources/requirements.rb +13 -3
- data/lib/telnyx/resources/storage/cloudfs/actions.rb +54 -0
- data/lib/telnyx/resources/storage/cloudfs.rb +187 -0
- data/lib/telnyx/resources/storage.rb +6 -0
- data/lib/telnyx/version.rb +1 -1
- data/lib/telnyx.rb +20 -0
- data/rbi/telnyx/models/ai/anthropic/v1_messages_params.rbi +314 -0
- data/rbi/telnyx/models/ai/anthropic/v1_messages_response.rbi +15 -0
- data/rbi/telnyx/models/ai/assistant_create_params.rbi +8 -4
- data/rbi/telnyx/models/ai/assistant_tool.rbi +37 -1
- data/rbi/telnyx/models/ai/assistant_update_params.rbi +8 -4
- data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +8 -4
- data/rbi/telnyx/models/ai/conversations/conversation_insight_retrieve_aggregates_params.rbi +188 -0
- data/rbi/telnyx/models/ai/conversations/conversation_insight_retrieve_aggregates_response.rbi +94 -0
- data/rbi/telnyx/models/ai/inference_embedding.rbi +12 -6
- data/rbi/telnyx/models/ai/pay_tool_params.rbi +71 -0
- data/rbi/telnyx/models/ai/tool_create_params.rbi +9 -0
- data/rbi/telnyx/models/ai/tool_update_params.rbi +9 -0
- data/rbi/telnyx/models/ai/transcription_settings.rbi +5 -5
- data/rbi/telnyx/models/call_answered.rbi +92 -4
- data/rbi/telnyx/models/call_dial_params.rbi +19 -0
- data/rbi/telnyx/models/call_hangup.rbi +90 -4
- data/rbi/telnyx/models/call_initiated.rbi +94 -4
- data/rbi/telnyx/models/calls/transcription_config.rbi +15 -7
- data/rbi/telnyx/models/calls/transcription_engine_parakeet_config.rbi +2 -2
- data/rbi/telnyx/models/doc_reqs_requirement.rbi +38 -9
- data/rbi/telnyx/models/inbound_message.rbi +324 -58
- data/rbi/telnyx/models/inbound_message_webhook_event.rbi +173 -4
- data/rbi/telnyx/models/managed_account_list_params.rbi +130 -6
- data/rbi/telnyx/models/requirement_list_params.rbi +13 -0
- data/rbi/telnyx/models/requirement_retrieve_params.rbi +21 -2
- data/rbi/telnyx/models/speech_to_text_retrieve_transcription_params.rbi +2 -2
- data/rbi/telnyx/models/storage/cloudf_create_params.rbi +103 -0
- data/rbi/telnyx/models/storage/cloudf_delete_params.rbi +40 -0
- data/rbi/telnyx/models/storage/cloudf_list_params.rbi +232 -0
- data/rbi/telnyx/models/storage/cloudf_list_response.rbi +327 -0
- data/rbi/telnyx/models/storage/cloudf_retrieve_params.rbi +40 -0
- data/rbi/telnyx/models/storage/cloudf_update_params.rbi +61 -0
- data/rbi/telnyx/models/storage/cloudfs/action_rotate_meta_token_params.rbi +50 -0
- data/rbi/telnyx/models/storage/cloudfs_filesystem_detail_response_wrapper.rbi +229 -0
- data/rbi/telnyx/models/storage/cloudfs_filesystem_response_wrapper.rbi +227 -0
- data/rbi/telnyx/models/storage/cloudfs_filesystem_status.rbi +57 -0
- data/rbi/telnyx/models/verify_profile.rbi +2 -2
- data/rbi/telnyx/models/verify_profile_create_params.rbi +2 -2
- data/rbi/telnyx/models/verify_profile_update_params.rbi +2 -2
- data/rbi/telnyx/resources/ai/anthropic/v1.rbi +106 -0
- data/rbi/telnyx/resources/ai/anthropic.rbi +17 -0
- data/rbi/telnyx/resources/ai/assistants/versions.rbi +2 -1
- data/rbi/telnyx/resources/ai/assistants.rbi +4 -2
- data/rbi/telnyx/resources/ai/conversations/conversation_insights.rbi +68 -0
- data/rbi/telnyx/resources/ai/conversations.rbi +6 -0
- data/rbi/telnyx/resources/ai/tools.rbi +4 -0
- data/rbi/telnyx/resources/ai.rbi +3 -0
- data/rbi/telnyx/resources/calls.rbi +7 -0
- data/rbi/telnyx/resources/managed_accounts.rbi +1 -1
- data/rbi/telnyx/resources/requirements.rbi +8 -0
- data/rbi/telnyx/resources/storage/cloudfs/actions.rbi +46 -0
- data/rbi/telnyx/resources/storage/cloudfs.rbi +152 -0
- data/rbi/telnyx/resources/storage.rbi +5 -0
- data/sig/telnyx/models/ai/anthropic/v1_messages_params.rbs +175 -0
- data/sig/telnyx/models/ai/anthropic/v1_messages_response.rbs +11 -0
- data/sig/telnyx/models/ai/assistant_tool.rbs +13 -0
- data/sig/telnyx/models/ai/conversations/conversation_insight_retrieve_aggregates_params.rbs +74 -0
- data/sig/telnyx/models/ai/conversations/conversation_insight_retrieve_aggregates_response.rbs +34 -0
- data/sig/telnyx/models/ai/pay_tool_params.rbs +41 -0
- data/sig/telnyx/models/ai/tool_create_params.rbs +7 -0
- data/sig/telnyx/models/ai/tool_update_params.rbs +7 -0
- data/sig/telnyx/models/ai/transcription_settings.rbs +2 -2
- data/sig/telnyx/models/call_answered.rbs +39 -6
- data/sig/telnyx/models/call_dial_params.rbs +7 -0
- data/sig/telnyx/models/call_hangup.rbs +39 -6
- data/sig/telnyx/models/call_initiated.rbs +39 -6
- data/sig/telnyx/models/calls/transcription_config.rbs +2 -2
- data/sig/telnyx/models/calls/transcription_engine_parakeet_config.rbs +2 -2
- data/sig/telnyx/models/doc_reqs_requirement.rbs +25 -8
- data/sig/telnyx/models/inbound_message.rbs +204 -35
- data/sig/telnyx/models/inbound_message_webhook_event.rbs +81 -5
- data/sig/telnyx/models/managed_account_list_params.rbs +47 -3
- data/sig/telnyx/models/requirement_list_params.rbs +8 -1
- data/sig/telnyx/models/requirement_retrieve_params.rbs +12 -2
- data/sig/telnyx/models/speech_to_text_retrieve_transcription_params.rbs +2 -2
- data/sig/telnyx/models/storage/cloudf_create_params.rbs +50 -0
- data/sig/telnyx/models/storage/cloudf_delete_params.rbs +22 -0
- data/sig/telnyx/models/storage/cloudf_list_params.rbs +112 -0
- data/sig/telnyx/models/storage/cloudf_list_response.rbs +163 -0
- data/sig/telnyx/models/storage/cloudf_retrieve_params.rbs +22 -0
- data/sig/telnyx/models/storage/cloudf_update_params.rbs +32 -0
- data/sig/telnyx/models/storage/cloudfs/action_rotate_meta_token_params.rbs +32 -0
- data/sig/telnyx/models/storage/cloudfs_filesystem_detail_response_wrapper.rbs +115 -0
- data/sig/telnyx/models/storage/cloudfs_filesystem_response_wrapper.rbs +115 -0
- data/sig/telnyx/models/storage/cloudfs_filesystem_status.rbs +21 -0
- data/sig/telnyx/resources/ai/anthropic/v1.rbs +35 -0
- data/sig/telnyx/resources/ai/anthropic.rbs +11 -0
- data/sig/telnyx/resources/ai/conversations/conversation_insights.rbs +20 -0
- data/sig/telnyx/resources/ai/conversations.rbs +2 -0
- data/sig/telnyx/resources/ai/tools.rbs +2 -0
- data/sig/telnyx/resources/ai.rbs +2 -0
- data/sig/telnyx/resources/calls.rbs +1 -0
- data/sig/telnyx/resources/requirements.rbs +2 -0
- data/sig/telnyx/resources/storage/cloudfs/actions.rbs +17 -0
- data/sig/telnyx/resources/storage/cloudfs.rbs +45 -0
- data/sig/telnyx/resources/storage.rbs +2 -0
- metadata +62 -2
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Models
|
|
5
|
+
module AI
|
|
6
|
+
module Conversations
|
|
7
|
+
class ConversationInsightRetrieveAggregatesParams < Telnyx::Internal::Type::BaseModel
|
|
8
|
+
extend Telnyx::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Telnyx::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
OrHash =
|
|
12
|
+
T.type_alias do
|
|
13
|
+
T.any(
|
|
14
|
+
Telnyx::AI::Conversations::ConversationInsightRetrieveAggregatesParams,
|
|
15
|
+
Telnyx::Internal::AnyHash
|
|
16
|
+
)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
# Filter by creation datetime to scope the aggregation window. Supports range
|
|
20
|
+
# operators (e.g., `created_at=gte.2025-01-01T00:00:00Z` for the start of the
|
|
21
|
+
# range, `created_at=lt.2025-01-02T00:00:00Z` for the end). To build per-day time
|
|
22
|
+
# series (as the portal does for the 'Insights Over Time' chart), issue one
|
|
23
|
+
# request per day bounded by `created_at=gte.<day_start>` and
|
|
24
|
+
# `created_at=lt.<next_day_start>`.
|
|
25
|
+
sig { returns(T.nilable(String)) }
|
|
26
|
+
attr_reader :created_at
|
|
27
|
+
|
|
28
|
+
sig { params(created_at: String).void }
|
|
29
|
+
attr_writer :created_at
|
|
30
|
+
|
|
31
|
+
# Fields to group by (can be comma-separated or multiple parameters). Prefix a
|
|
32
|
+
# field with 'metadata.' (e.g. 'metadata.assistant_id') to group by the
|
|
33
|
+
# conversation's metadata instead of the insight result.
|
|
34
|
+
#
|
|
35
|
+
# Common fields used for over-time charts:
|
|
36
|
+
#
|
|
37
|
+
# - `score` — Group by the insight's score value (e.g. for Agent Instruction
|
|
38
|
+
# Following, User Satisfaction).
|
|
39
|
+
# - `metadata.assistant_id` — Group by the assistant that handled the
|
|
40
|
+
# conversation.
|
|
41
|
+
# - `metadata.assistant_version_id` — Group by the assistant version, useful for
|
|
42
|
+
# comparing performance across versions in the portal's 'Insights Over Time'
|
|
43
|
+
# chart.
|
|
44
|
+
# - `metadata.telnyx_conversation_channel` — Group by conversation channel
|
|
45
|
+
# (phone_call, web_chat, etc.).
|
|
46
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
47
|
+
attr_reader :group_by
|
|
48
|
+
|
|
49
|
+
sig { params(group_by: T::Array[String]).void }
|
|
50
|
+
attr_writer :group_by
|
|
51
|
+
|
|
52
|
+
# Optional insight ID to filter conversation insights. Only insights matching this
|
|
53
|
+
# ID will be included in the aggregation.
|
|
54
|
+
sig { returns(T.nilable(String)) }
|
|
55
|
+
attr_reader :insight_id
|
|
56
|
+
|
|
57
|
+
sig { params(insight_id: String).void }
|
|
58
|
+
attr_writer :insight_id
|
|
59
|
+
|
|
60
|
+
sig do
|
|
61
|
+
returns(
|
|
62
|
+
T.nilable(
|
|
63
|
+
Telnyx::AI::Conversations::ConversationInsightRetrieveAggregatesParams::Metadata
|
|
64
|
+
)
|
|
65
|
+
)
|
|
66
|
+
end
|
|
67
|
+
attr_reader :metadata
|
|
68
|
+
|
|
69
|
+
sig do
|
|
70
|
+
params(
|
|
71
|
+
metadata:
|
|
72
|
+
Telnyx::AI::Conversations::ConversationInsightRetrieveAggregatesParams::Metadata::OrHash
|
|
73
|
+
).void
|
|
74
|
+
end
|
|
75
|
+
attr_writer :metadata
|
|
76
|
+
|
|
77
|
+
# Fields to include in the result (can be comma-separated or multiple parameters).
|
|
78
|
+
# Supports the same 'metadata.<key>' prefix as group_by. Each returned row will
|
|
79
|
+
# contain the grouped field values plus a `record_count` indicating how many
|
|
80
|
+
# conversation insights match that combination.
|
|
81
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
82
|
+
attr_reader :show
|
|
83
|
+
|
|
84
|
+
sig { params(show: T::Array[String]).void }
|
|
85
|
+
attr_writer :show
|
|
86
|
+
|
|
87
|
+
sig do
|
|
88
|
+
params(
|
|
89
|
+
created_at: String,
|
|
90
|
+
group_by: T::Array[String],
|
|
91
|
+
insight_id: String,
|
|
92
|
+
metadata:
|
|
93
|
+
Telnyx::AI::Conversations::ConversationInsightRetrieveAggregatesParams::Metadata::OrHash,
|
|
94
|
+
show: T::Array[String],
|
|
95
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
96
|
+
).returns(T.attached_class)
|
|
97
|
+
end
|
|
98
|
+
def self.new(
|
|
99
|
+
# Filter by creation datetime to scope the aggregation window. Supports range
|
|
100
|
+
# operators (e.g., `created_at=gte.2025-01-01T00:00:00Z` for the start of the
|
|
101
|
+
# range, `created_at=lt.2025-01-02T00:00:00Z` for the end). To build per-day time
|
|
102
|
+
# series (as the portal does for the 'Insights Over Time' chart), issue one
|
|
103
|
+
# request per day bounded by `created_at=gte.<day_start>` and
|
|
104
|
+
# `created_at=lt.<next_day_start>`.
|
|
105
|
+
created_at: nil,
|
|
106
|
+
# Fields to group by (can be comma-separated or multiple parameters). Prefix a
|
|
107
|
+
# field with 'metadata.' (e.g. 'metadata.assistant_id') to group by the
|
|
108
|
+
# conversation's metadata instead of the insight result.
|
|
109
|
+
#
|
|
110
|
+
# Common fields used for over-time charts:
|
|
111
|
+
#
|
|
112
|
+
# - `score` — Group by the insight's score value (e.g. for Agent Instruction
|
|
113
|
+
# Following, User Satisfaction).
|
|
114
|
+
# - `metadata.assistant_id` — Group by the assistant that handled the
|
|
115
|
+
# conversation.
|
|
116
|
+
# - `metadata.assistant_version_id` — Group by the assistant version, useful for
|
|
117
|
+
# comparing performance across versions in the portal's 'Insights Over Time'
|
|
118
|
+
# chart.
|
|
119
|
+
# - `metadata.telnyx_conversation_channel` — Group by conversation channel
|
|
120
|
+
# (phone_call, web_chat, etc.).
|
|
121
|
+
group_by: nil,
|
|
122
|
+
# Optional insight ID to filter conversation insights. Only insights matching this
|
|
123
|
+
# ID will be included in the aggregation.
|
|
124
|
+
insight_id: nil,
|
|
125
|
+
metadata: nil,
|
|
126
|
+
# Fields to include in the result (can be comma-separated or multiple parameters).
|
|
127
|
+
# Supports the same 'metadata.<key>' prefix as group_by. Each returned row will
|
|
128
|
+
# contain the grouped field values plus a `record_count` indicating how many
|
|
129
|
+
# conversation insights match that combination.
|
|
130
|
+
show: nil,
|
|
131
|
+
request_options: {}
|
|
132
|
+
)
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
sig do
|
|
136
|
+
override.returns(
|
|
137
|
+
{
|
|
138
|
+
created_at: String,
|
|
139
|
+
group_by: T::Array[String],
|
|
140
|
+
insight_id: String,
|
|
141
|
+
metadata:
|
|
142
|
+
Telnyx::AI::Conversations::ConversationInsightRetrieveAggregatesParams::Metadata,
|
|
143
|
+
show: T::Array[String],
|
|
144
|
+
request_options: Telnyx::RequestOptions
|
|
145
|
+
}
|
|
146
|
+
)
|
|
147
|
+
end
|
|
148
|
+
def to_hash
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
class Metadata < Telnyx::Internal::Type::BaseModel
|
|
152
|
+
OrHash =
|
|
153
|
+
T.type_alias do
|
|
154
|
+
T.any(
|
|
155
|
+
Telnyx::AI::Conversations::ConversationInsightRetrieveAggregatesParams::Metadata,
|
|
156
|
+
Telnyx::Internal::AnyHash
|
|
157
|
+
)
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Filter by assistant ID (e.g., `metadata.assistant_id=eq.<assistant_id>`). When
|
|
161
|
+
# provided, only conversation insights for the specified assistant are aggregated.
|
|
162
|
+
# Used by the portal to scope the 'Insights Over Time' chart to a single
|
|
163
|
+
# assistant.
|
|
164
|
+
sig { returns(T.nilable(String)) }
|
|
165
|
+
attr_reader :assistant_id
|
|
166
|
+
|
|
167
|
+
sig { params(assistant_id: String).void }
|
|
168
|
+
attr_writer :assistant_id
|
|
169
|
+
|
|
170
|
+
sig { params(assistant_id: String).returns(T.attached_class) }
|
|
171
|
+
def self.new(
|
|
172
|
+
# Filter by assistant ID (e.g., `metadata.assistant_id=eq.<assistant_id>`). When
|
|
173
|
+
# provided, only conversation insights for the specified assistant are aggregated.
|
|
174
|
+
# Used by the portal to scope the 'Insights Over Time' chart to a single
|
|
175
|
+
# assistant.
|
|
176
|
+
assistant_id: nil
|
|
177
|
+
)
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
sig { override.returns({ assistant_id: String }) }
|
|
181
|
+
def to_hash
|
|
182
|
+
end
|
|
183
|
+
end
|
|
184
|
+
end
|
|
185
|
+
end
|
|
186
|
+
end
|
|
187
|
+
end
|
|
188
|
+
end
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Models
|
|
5
|
+
module AI
|
|
6
|
+
module Conversations
|
|
7
|
+
class ConversationInsightRetrieveAggregatesResponse < Telnyx::Internal::Type::BaseModel
|
|
8
|
+
OrHash =
|
|
9
|
+
T.type_alias do
|
|
10
|
+
T.any(
|
|
11
|
+
Telnyx::Models::AI::Conversations::ConversationInsightRetrieveAggregatesResponse,
|
|
12
|
+
Telnyx::Internal::AnyHash
|
|
13
|
+
)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
# Aggregation result rows. Each row contains the grouped field values and a
|
|
17
|
+
# `record_count`.
|
|
18
|
+
sig do
|
|
19
|
+
returns(
|
|
20
|
+
T::Array[
|
|
21
|
+
Telnyx::Models::AI::Conversations::ConversationInsightRetrieveAggregatesResponse::Data
|
|
22
|
+
]
|
|
23
|
+
)
|
|
24
|
+
end
|
|
25
|
+
attr_accessor :data
|
|
26
|
+
|
|
27
|
+
# Aggregated conversation insight counts grouped by the specified fields. Each
|
|
28
|
+
# item in `data` contains the grouped field values and a `record_count` indicating
|
|
29
|
+
# how many conversation insights match that combination.
|
|
30
|
+
sig do
|
|
31
|
+
params(
|
|
32
|
+
data:
|
|
33
|
+
T::Array[
|
|
34
|
+
Telnyx::Models::AI::Conversations::ConversationInsightRetrieveAggregatesResponse::Data::OrHash
|
|
35
|
+
]
|
|
36
|
+
).returns(T.attached_class)
|
|
37
|
+
end
|
|
38
|
+
def self.new(
|
|
39
|
+
# Aggregation result rows. Each row contains the grouped field values and a
|
|
40
|
+
# `record_count`.
|
|
41
|
+
data:
|
|
42
|
+
)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
sig do
|
|
46
|
+
override.returns(
|
|
47
|
+
{
|
|
48
|
+
data:
|
|
49
|
+
T::Array[
|
|
50
|
+
Telnyx::Models::AI::Conversations::ConversationInsightRetrieveAggregatesResponse::Data
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
end
|
|
55
|
+
def to_hash
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
class Data < Telnyx::Internal::Type::BaseModel
|
|
59
|
+
OrHash =
|
|
60
|
+
T.type_alias do
|
|
61
|
+
T.any(
|
|
62
|
+
Telnyx::Models::AI::Conversations::ConversationInsightRetrieveAggregatesResponse::Data,
|
|
63
|
+
Telnyx::Internal::AnyHash
|
|
64
|
+
)
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Number of conversation insights that match this combination of grouped field
|
|
68
|
+
# values.
|
|
69
|
+
sig { returns(Integer) }
|
|
70
|
+
attr_accessor :record_count
|
|
71
|
+
|
|
72
|
+
# An aggregation row. Contains the grouped field values (keyed by the group_by
|
|
73
|
+
# field names) and a `record_count` integer. For example, when grouping by
|
|
74
|
+
# `score`, each row has a `score` value and a `record_count` of conversations with
|
|
75
|
+
# that score. When also splitting by `metadata.assistant_version_id`, each row
|
|
76
|
+
# includes both `score` and `metadata.assistant_version_id` plus their combined
|
|
77
|
+
# `record_count`.
|
|
78
|
+
sig { params(record_count: Integer).returns(T.attached_class) }
|
|
79
|
+
def self.new(
|
|
80
|
+
# Number of conversation insights that match this combination of grouped field
|
|
81
|
+
# values.
|
|
82
|
+
record_count:
|
|
83
|
+
)
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
sig { override.returns({ record_count: Integer }) }
|
|
87
|
+
def to_hash
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
end
|
|
@@ -278,7 +278,8 @@ module Telnyx
|
|
|
278
278
|
Telnyx::AI::AssistantTool::Refer::OrHash,
|
|
279
279
|
Telnyx::AI::AssistantTool::SendDtmf::OrHash,
|
|
280
280
|
Telnyx::AI::AssistantTool::SendMessage::OrHash,
|
|
281
|
-
Telnyx::AI::AssistantTool::SkipTurn::OrHash
|
|
281
|
+
Telnyx::AI::AssistantTool::SkipTurn::OrHash,
|
|
282
|
+
Telnyx::AI::AssistantTool::Pay::OrHash
|
|
282
283
|
)
|
|
283
284
|
]
|
|
284
285
|
).void
|
|
@@ -373,7 +374,8 @@ module Telnyx
|
|
|
373
374
|
Telnyx::AI::AssistantTool::Refer::OrHash,
|
|
374
375
|
Telnyx::AI::AssistantTool::SendDtmf::OrHash,
|
|
375
376
|
Telnyx::AI::AssistantTool::SendMessage::OrHash,
|
|
376
|
-
Telnyx::AI::AssistantTool::SkipTurn::OrHash
|
|
377
|
+
Telnyx::AI::AssistantTool::SkipTurn::OrHash,
|
|
378
|
+
Telnyx::AI::AssistantTool::Pay::OrHash
|
|
377
379
|
)
|
|
378
380
|
],
|
|
379
381
|
transcription: Telnyx::AI::TranscriptionSettings::OrHash,
|
|
@@ -733,7 +735,8 @@ module Telnyx
|
|
|
733
735
|
Telnyx::AI::AssistantTool::Refer::OrHash,
|
|
734
736
|
Telnyx::AI::AssistantTool::SendDtmf::OrHash,
|
|
735
737
|
Telnyx::AI::AssistantTool::SendMessage::OrHash,
|
|
736
|
-
Telnyx::AI::AssistantTool::SkipTurn::OrHash
|
|
738
|
+
Telnyx::AI::AssistantTool::SkipTurn::OrHash,
|
|
739
|
+
Telnyx::AI::AssistantTool::Pay::OrHash
|
|
737
740
|
)
|
|
738
741
|
]
|
|
739
742
|
]
|
|
@@ -826,7 +829,8 @@ module Telnyx
|
|
|
826
829
|
Telnyx::AI::AssistantTool::Refer::OrHash,
|
|
827
830
|
Telnyx::AI::AssistantTool::SendDtmf::OrHash,
|
|
828
831
|
Telnyx::AI::AssistantTool::SendMessage::OrHash,
|
|
829
|
-
Telnyx::AI::AssistantTool::SkipTurn::OrHash
|
|
832
|
+
Telnyx::AI::AssistantTool::SkipTurn::OrHash,
|
|
833
|
+
Telnyx::AI::AssistantTool::Pay::OrHash
|
|
830
834
|
)
|
|
831
835
|
]
|
|
832
836
|
],
|
|
@@ -1084,7 +1088,8 @@ module Telnyx
|
|
|
1084
1088
|
Telnyx::AI::AssistantTool::Refer::OrHash,
|
|
1085
1089
|
Telnyx::AI::AssistantTool::SendDtmf::OrHash,
|
|
1086
1090
|
Telnyx::AI::AssistantTool::SendMessage::OrHash,
|
|
1087
|
-
Telnyx::AI::AssistantTool::SkipTurn::OrHash
|
|
1091
|
+
Telnyx::AI::AssistantTool::SkipTurn::OrHash,
|
|
1092
|
+
Telnyx::AI::AssistantTool::Pay::OrHash
|
|
1088
1093
|
)
|
|
1089
1094
|
]
|
|
1090
1095
|
).void
|
|
@@ -1129,7 +1134,8 @@ module Telnyx
|
|
|
1129
1134
|
Telnyx::AI::AssistantTool::Refer::OrHash,
|
|
1130
1135
|
Telnyx::AI::AssistantTool::SendDtmf::OrHash,
|
|
1131
1136
|
Telnyx::AI::AssistantTool::SendMessage::OrHash,
|
|
1132
|
-
Telnyx::AI::AssistantTool::SkipTurn::OrHash
|
|
1137
|
+
Telnyx::AI::AssistantTool::SkipTurn::OrHash,
|
|
1138
|
+
Telnyx::AI::AssistantTool::Pay::OrHash
|
|
1133
1139
|
)
|
|
1134
1140
|
],
|
|
1135
1141
|
type:
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Models
|
|
5
|
+
module AI
|
|
6
|
+
class PayToolParams < Telnyx::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(Telnyx::AI::PayToolParams, Telnyx::Internal::AnyHash)
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# The name of the pay connector configured in the Telnyx API. Must reference an
|
|
13
|
+
# existing pay connector for this organization.
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :connector_name
|
|
16
|
+
|
|
17
|
+
# Default currency for payments processed by this tool.
|
|
18
|
+
sig { returns(T.nilable(String)) }
|
|
19
|
+
attr_reader :currency
|
|
20
|
+
|
|
21
|
+
sig { params(currency: String).void }
|
|
22
|
+
attr_writer :currency
|
|
23
|
+
|
|
24
|
+
# Optional description of the pay tool that will be passed to the assistant.
|
|
25
|
+
sig { returns(T.nilable(String)) }
|
|
26
|
+
attr_accessor :description
|
|
27
|
+
|
|
28
|
+
# Default payment method for payments processed by this tool.
|
|
29
|
+
sig { returns(T.nilable(String)) }
|
|
30
|
+
attr_reader :payment_method
|
|
31
|
+
|
|
32
|
+
sig { params(payment_method: String).void }
|
|
33
|
+
attr_writer :payment_method
|
|
34
|
+
|
|
35
|
+
sig do
|
|
36
|
+
params(
|
|
37
|
+
connector_name: String,
|
|
38
|
+
currency: String,
|
|
39
|
+
description: T.nilable(String),
|
|
40
|
+
payment_method: String
|
|
41
|
+
).returns(T.attached_class)
|
|
42
|
+
end
|
|
43
|
+
def self.new(
|
|
44
|
+
# The name of the pay connector configured in the Telnyx API. Must reference an
|
|
45
|
+
# existing pay connector for this organization.
|
|
46
|
+
connector_name:,
|
|
47
|
+
# Default currency for payments processed by this tool.
|
|
48
|
+
currency: nil,
|
|
49
|
+
# Optional description of the pay tool that will be passed to the assistant.
|
|
50
|
+
description: nil,
|
|
51
|
+
# Default payment method for payments processed by this tool.
|
|
52
|
+
payment_method: nil
|
|
53
|
+
)
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
sig do
|
|
57
|
+
override.returns(
|
|
58
|
+
{
|
|
59
|
+
connector_name: String,
|
|
60
|
+
currency: String,
|
|
61
|
+
description: T.nilable(String),
|
|
62
|
+
payment_method: String
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
end
|
|
66
|
+
def to_hash
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
@@ -42,6 +42,12 @@ module Telnyx
|
|
|
42
42
|
sig { params(invite: T::Hash[Symbol, T.anything]).void }
|
|
43
43
|
attr_writer :invite
|
|
44
44
|
|
|
45
|
+
sig { returns(T.nilable(Telnyx::AI::PayToolParams)) }
|
|
46
|
+
attr_reader :pay
|
|
47
|
+
|
|
48
|
+
sig { params(pay: Telnyx::AI::PayToolParams::OrHash).void }
|
|
49
|
+
attr_writer :pay
|
|
50
|
+
|
|
45
51
|
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
46
52
|
attr_reader :retrieval
|
|
47
53
|
|
|
@@ -68,6 +74,7 @@ module Telnyx
|
|
|
68
74
|
function: T::Hash[Symbol, T.anything],
|
|
69
75
|
handoff: T::Hash[Symbol, T.anything],
|
|
70
76
|
invite: T::Hash[Symbol, T.anything],
|
|
77
|
+
pay: Telnyx::AI::PayToolParams::OrHash,
|
|
71
78
|
retrieval: T::Hash[Symbol, T.anything],
|
|
72
79
|
timeout_ms: Integer,
|
|
73
80
|
webhook: T::Hash[Symbol, T.anything],
|
|
@@ -81,6 +88,7 @@ module Telnyx
|
|
|
81
88
|
function: nil,
|
|
82
89
|
handoff: nil,
|
|
83
90
|
invite: nil,
|
|
91
|
+
pay: nil,
|
|
84
92
|
retrieval: nil,
|
|
85
93
|
timeout_ms: nil,
|
|
86
94
|
webhook: nil,
|
|
@@ -97,6 +105,7 @@ module Telnyx
|
|
|
97
105
|
function: T::Hash[Symbol, T.anything],
|
|
98
106
|
handoff: T::Hash[Symbol, T.anything],
|
|
99
107
|
invite: T::Hash[Symbol, T.anything],
|
|
108
|
+
pay: Telnyx::AI::PayToolParams,
|
|
100
109
|
retrieval: T::Hash[Symbol, T.anything],
|
|
101
110
|
timeout_ms: Integer,
|
|
102
111
|
webhook: T::Hash[Symbol, T.anything],
|
|
@@ -45,6 +45,12 @@ module Telnyx
|
|
|
45
45
|
sig { params(invite: T::Hash[Symbol, T.anything]).void }
|
|
46
46
|
attr_writer :invite
|
|
47
47
|
|
|
48
|
+
sig { returns(T.nilable(Telnyx::AI::PayToolParams)) }
|
|
49
|
+
attr_reader :pay
|
|
50
|
+
|
|
51
|
+
sig { params(pay: Telnyx::AI::PayToolParams::OrHash).void }
|
|
52
|
+
attr_writer :pay
|
|
53
|
+
|
|
48
54
|
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
49
55
|
attr_reader :retrieval
|
|
50
56
|
|
|
@@ -77,6 +83,7 @@ module Telnyx
|
|
|
77
83
|
function: T::Hash[Symbol, T.anything],
|
|
78
84
|
handoff: T::Hash[Symbol, T.anything],
|
|
79
85
|
invite: T::Hash[Symbol, T.anything],
|
|
86
|
+
pay: Telnyx::AI::PayToolParams::OrHash,
|
|
80
87
|
retrieval: T::Hash[Symbol, T.anything],
|
|
81
88
|
timeout_ms: Integer,
|
|
82
89
|
type: String,
|
|
@@ -91,6 +98,7 @@ module Telnyx
|
|
|
91
98
|
function: nil,
|
|
92
99
|
handoff: nil,
|
|
93
100
|
invite: nil,
|
|
101
|
+
pay: nil,
|
|
94
102
|
retrieval: nil,
|
|
95
103
|
timeout_ms: nil,
|
|
96
104
|
type: nil,
|
|
@@ -108,6 +116,7 @@ module Telnyx
|
|
|
108
116
|
function: T::Hash[Symbol, T.anything],
|
|
109
117
|
handoff: T::Hash[Symbol, T.anything],
|
|
110
118
|
invite: T::Hash[Symbol, T.anything],
|
|
119
|
+
pay: Telnyx::AI::PayToolParams,
|
|
111
120
|
retrieval: T::Hash[Symbol, T.anything],
|
|
112
121
|
timeout_ms: Integer,
|
|
113
122
|
type: String,
|
|
@@ -42,7 +42,7 @@ module Telnyx
|
|
|
42
42
|
# - `xai/grok-stt` is a multilingual Grok STT model.
|
|
43
43
|
# - `soniox/stt-rt-v4` is a multilingual streaming model with automatic language
|
|
44
44
|
# detection and configurable endpointing.
|
|
45
|
-
# - `parakeet
|
|
45
|
+
# - `nvidia/parakeet-v3` is a multilingual transcription model with automatic
|
|
46
46
|
# language detection.
|
|
47
47
|
sig do
|
|
48
48
|
returns(T.nilable(Telnyx::AI::TranscriptionSettings::Model::OrSymbol))
|
|
@@ -103,7 +103,7 @@ module Telnyx
|
|
|
103
103
|
# - `xai/grok-stt` is a multilingual Grok STT model.
|
|
104
104
|
# - `soniox/stt-rt-v4` is a multilingual streaming model with automatic language
|
|
105
105
|
# detection and configurable endpointing.
|
|
106
|
-
# - `parakeet
|
|
106
|
+
# - `nvidia/parakeet-v3` is a multilingual transcription model with automatic
|
|
107
107
|
# language detection.
|
|
108
108
|
model: nil,
|
|
109
109
|
# Region on third party cloud providers (currently Azure) if using one of their
|
|
@@ -139,7 +139,7 @@ module Telnyx
|
|
|
139
139
|
# - `xai/grok-stt` is a multilingual Grok STT model.
|
|
140
140
|
# - `soniox/stt-rt-v4` is a multilingual streaming model with automatic language
|
|
141
141
|
# detection and configurable endpointing.
|
|
142
|
-
# - `parakeet
|
|
142
|
+
# - `nvidia/parakeet-v3` is a multilingual transcription model with automatic
|
|
143
143
|
# language detection.
|
|
144
144
|
module Model
|
|
145
145
|
extend Telnyx::Internal::Type::Enum
|
|
@@ -185,9 +185,9 @@ module Telnyx
|
|
|
185
185
|
:"soniox/stt-rt-v4",
|
|
186
186
|
Telnyx::AI::TranscriptionSettings::Model::TaggedSymbol
|
|
187
187
|
)
|
|
188
|
-
|
|
188
|
+
NVIDIA_PARAKEET_V3 =
|
|
189
189
|
T.let(
|
|
190
|
-
:"parakeet
|
|
190
|
+
:"nvidia/parakeet-v3",
|
|
191
191
|
Telnyx::AI::TranscriptionSettings::Model::TaggedSymbol
|
|
192
192
|
)
|
|
193
193
|
DISTIL_WHISPER_DISTIL_LARGE_V2 =
|
|
@@ -158,10 +158,17 @@ module Telnyx
|
|
|
158
158
|
attr_writer :from
|
|
159
159
|
|
|
160
160
|
# User-to-User and Diversion headers from sip invite.
|
|
161
|
-
sig
|
|
161
|
+
sig do
|
|
162
|
+
returns(T.nilable(T::Array[Telnyx::CallAnswered::Payload::SipHeader]))
|
|
163
|
+
end
|
|
162
164
|
attr_reader :sip_headers
|
|
163
165
|
|
|
164
|
-
sig
|
|
166
|
+
sig do
|
|
167
|
+
params(
|
|
168
|
+
sip_headers:
|
|
169
|
+
T::Array[Telnyx::CallAnswered::Payload::SipHeader::OrHash]
|
|
170
|
+
).void
|
|
171
|
+
end
|
|
165
172
|
attr_writer :sip_headers
|
|
166
173
|
|
|
167
174
|
# ISO 8601 datetime of when the call started.
|
|
@@ -205,7 +212,8 @@ module Telnyx
|
|
|
205
212
|
connection_id: String,
|
|
206
213
|
custom_headers: T::Array[Telnyx::CustomSipHeader::OrHash],
|
|
207
214
|
from: String,
|
|
208
|
-
sip_headers:
|
|
215
|
+
sip_headers:
|
|
216
|
+
T::Array[Telnyx::CallAnswered::Payload::SipHeader::OrHash],
|
|
209
217
|
start_time: Time,
|
|
210
218
|
state: Telnyx::CallAnswered::Payload::State::OrSymbol,
|
|
211
219
|
tags: T::Array[String],
|
|
@@ -252,7 +260,7 @@ module Telnyx
|
|
|
252
260
|
connection_id: String,
|
|
253
261
|
custom_headers: T::Array[Telnyx::CustomSipHeader],
|
|
254
262
|
from: String,
|
|
255
|
-
sip_headers: T::Array[Telnyx::SipHeader],
|
|
263
|
+
sip_headers: T::Array[Telnyx::CallAnswered::Payload::SipHeader],
|
|
256
264
|
start_time: Time,
|
|
257
265
|
state: Telnyx::CallAnswered::Payload::State::TaggedSymbol,
|
|
258
266
|
tags: T::Array[String],
|
|
@@ -263,6 +271,86 @@ module Telnyx
|
|
|
263
271
|
def to_hash
|
|
264
272
|
end
|
|
265
273
|
|
|
274
|
+
class SipHeader < Telnyx::Internal::Type::BaseModel
|
|
275
|
+
OrHash =
|
|
276
|
+
T.type_alias do
|
|
277
|
+
T.any(
|
|
278
|
+
Telnyx::CallAnswered::Payload::SipHeader,
|
|
279
|
+
Telnyx::Internal::AnyHash
|
|
280
|
+
)
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
# The name of the header received from the SIP INVITE.
|
|
284
|
+
sig do
|
|
285
|
+
returns(
|
|
286
|
+
Telnyx::CallAnswered::Payload::SipHeader::Name::TaggedSymbol
|
|
287
|
+
)
|
|
288
|
+
end
|
|
289
|
+
attr_accessor :name
|
|
290
|
+
|
|
291
|
+
# The value of the header.
|
|
292
|
+
sig { returns(String) }
|
|
293
|
+
attr_accessor :value
|
|
294
|
+
|
|
295
|
+
sig do
|
|
296
|
+
params(
|
|
297
|
+
name: Telnyx::CallAnswered::Payload::SipHeader::Name::OrSymbol,
|
|
298
|
+
value: String
|
|
299
|
+
).returns(T.attached_class)
|
|
300
|
+
end
|
|
301
|
+
def self.new(
|
|
302
|
+
# The name of the header received from the SIP INVITE.
|
|
303
|
+
name:,
|
|
304
|
+
# The value of the header.
|
|
305
|
+
value:
|
|
306
|
+
)
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
sig do
|
|
310
|
+
override.returns(
|
|
311
|
+
{
|
|
312
|
+
name:
|
|
313
|
+
Telnyx::CallAnswered::Payload::SipHeader::Name::TaggedSymbol,
|
|
314
|
+
value: String
|
|
315
|
+
}
|
|
316
|
+
)
|
|
317
|
+
end
|
|
318
|
+
def to_hash
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
# The name of the header received from the SIP INVITE.
|
|
322
|
+
module Name
|
|
323
|
+
extend Telnyx::Internal::Type::Enum
|
|
324
|
+
|
|
325
|
+
TaggedSymbol =
|
|
326
|
+
T.type_alias do
|
|
327
|
+
T.all(Symbol, Telnyx::CallAnswered::Payload::SipHeader::Name)
|
|
328
|
+
end
|
|
329
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
330
|
+
|
|
331
|
+
USER_TO_USER =
|
|
332
|
+
T.let(
|
|
333
|
+
:"User-to-User",
|
|
334
|
+
Telnyx::CallAnswered::Payload::SipHeader::Name::TaggedSymbol
|
|
335
|
+
)
|
|
336
|
+
DIVERSION =
|
|
337
|
+
T.let(
|
|
338
|
+
:Diversion,
|
|
339
|
+
Telnyx::CallAnswered::Payload::SipHeader::Name::TaggedSymbol
|
|
340
|
+
)
|
|
341
|
+
|
|
342
|
+
sig do
|
|
343
|
+
override.returns(
|
|
344
|
+
T::Array[
|
|
345
|
+
Telnyx::CallAnswered::Payload::SipHeader::Name::TaggedSymbol
|
|
346
|
+
]
|
|
347
|
+
)
|
|
348
|
+
end
|
|
349
|
+
def self.values
|
|
350
|
+
end
|
|
351
|
+
end
|
|
352
|
+
end
|
|
353
|
+
|
|
266
354
|
# State received from a command.
|
|
267
355
|
module State
|
|
268
356
|
extend Telnyx::Internal::Type::Enum
|