telnyx 5.76.0 → 5.77.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 +13 -0
- data/README.md +1 -1
- data/lib/telnyx/models/ai/conversations/message_list_params.rb +18 -1
- data/lib/telnyx/models/ai/conversations/message_list_response.rb +91 -109
- data/lib/telnyx/models/call_dial_params.rb +6 -2
- data/lib/telnyx/models/calls/action_transfer_params.rb +6 -2
- data/lib/telnyx/resources/ai/conversations/messages.rb +12 -3
- data/lib/telnyx/version.rb +1 -1
- data/rbi/telnyx/models/ai/conversations/message_list_params.rbi +26 -1
- data/rbi/telnyx/models/ai/conversations/message_list_response.rbi +176 -231
- data/rbi/telnyx/models/call_dial_params.rbi +9 -3
- data/rbi/telnyx/models/calls/action_transfer_params.rbi +9 -3
- data/rbi/telnyx/resources/ai/conversations/messages.rbi +15 -2
- data/rbi/telnyx/resources/calls/actions.rbi +3 -1
- data/rbi/telnyx/resources/calls.rbi +3 -1
- data/sig/telnyx/models/ai/conversations/message_list_params.rbs +13 -1
- data/sig/telnyx/models/ai/conversations/message_list_response.rbs +67 -89
- data/sig/telnyx/resources/ai/conversations/messages.rbs +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f7fb5e6708a25a947a58c8325f1169ed1e5eaa2a72f70b2910a02e80ed7ba715
|
|
4
|
+
data.tar.gz: b245bd720941ef0732a77fc2ada7b3b7cff57dcb811d640f77a55d0f8bac5f52
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 92dffc9184ed50722bc216bb5ed3d77f860d253f13b9d710e77dede2303de6f7a2d8e191c1bfb61ccff4b9e0d728430e56fa52c3b41d9ae026c71771f9d62db1
|
|
7
|
+
data.tar.gz: 93797b87d12c38392de5f50ee5f980834871119efce30964784ff8e9736cb72088c2a80e11a5f2e4b5cb3a198e3a42ace139b1c2f62c5c278911436366c9806c
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.77.0 (2026-04-17)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v5.76.0...v5.77.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.76.0...v5.77.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* TELAPPS Provide description what params can be used for premium amd ([86f672e](https://github.com/team-telnyx/telnyx-ruby/commit/86f672e62e347c27623d2e9ae9d588208e19d4b8))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Documentation
|
|
13
|
+
|
|
14
|
+
* add pagination params to conversation messages endpoint ([6a87bac](https://github.com/team-telnyx/telnyx-ruby/commit/6a87bac178ee42635b530efef5e7aef6a48047f9))
|
|
15
|
+
|
|
3
16
|
## 5.76.0 (2026-04-15)
|
|
4
17
|
|
|
5
18
|
Full Changelog: [v5.75.0...v5.76.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.75.0...v5.76.0)
|
data/README.md
CHANGED
|
@@ -14,8 +14,25 @@ module Telnyx
|
|
|
14
14
|
# @return [String]
|
|
15
15
|
required :conversation_id, String
|
|
16
16
|
|
|
17
|
-
# @!
|
|
17
|
+
# @!attribute page_number
|
|
18
|
+
# The page number to retrieve.
|
|
19
|
+
#
|
|
20
|
+
# @return [Integer, nil]
|
|
21
|
+
optional :page_number, Integer
|
|
22
|
+
|
|
23
|
+
# @!attribute page_size
|
|
24
|
+
# The number of messages to return per page.
|
|
25
|
+
#
|
|
26
|
+
# @return [Integer, nil]
|
|
27
|
+
optional :page_size, Integer
|
|
28
|
+
|
|
29
|
+
# @!method initialize(conversation_id:, page_number: nil, page_size: nil, request_options: {})
|
|
18
30
|
# @param conversation_id [String]
|
|
31
|
+
#
|
|
32
|
+
# @param page_number [Integer] The page number to retrieve.
|
|
33
|
+
#
|
|
34
|
+
# @param page_size [Integer] The number of messages to return per page.
|
|
35
|
+
#
|
|
19
36
|
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}]
|
|
20
37
|
end
|
|
21
38
|
end
|
|
@@ -6,140 +6,122 @@ module Telnyx
|
|
|
6
6
|
module Conversations
|
|
7
7
|
# @see Telnyx::Resources::AI::Conversations::Messages#list
|
|
8
8
|
class MessageListResponse < Telnyx::Internal::Type::BaseModel
|
|
9
|
-
# @!attribute
|
|
9
|
+
# @!attribute role
|
|
10
|
+
# The role of the message sender.
|
|
10
11
|
#
|
|
11
|
-
# @return [
|
|
12
|
-
required :
|
|
13
|
-
-> { Telnyx::Internal::Type::ArrayOf[Telnyx::Models::AI::Conversations::MessageListResponse::Data] }
|
|
12
|
+
# @return [Symbol, Telnyx::Models::AI::Conversations::MessageListResponse::Role]
|
|
13
|
+
required :role, enum: -> { Telnyx::Models::AI::Conversations::MessageListResponse::Role }
|
|
14
14
|
|
|
15
|
-
# @!attribute
|
|
15
|
+
# @!attribute text
|
|
16
|
+
# The message content. Can be null for tool calls.
|
|
16
17
|
#
|
|
17
|
-
# @return [
|
|
18
|
-
required :
|
|
18
|
+
# @return [String]
|
|
19
|
+
required :text, String
|
|
19
20
|
|
|
20
|
-
# @!
|
|
21
|
-
#
|
|
22
|
-
#
|
|
21
|
+
# @!attribute created_at
|
|
22
|
+
# The datetime the message was created on the conversation. This does not
|
|
23
|
+
# necesarily correspond to the time the message was sent. The best field to use to
|
|
24
|
+
# determine the time the end user experienced the message is `sent_at`.
|
|
25
|
+
#
|
|
26
|
+
# @return [Time, nil]
|
|
27
|
+
optional :created_at, Time
|
|
23
28
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
required :role, enum: -> { Telnyx::Models::AI::Conversations::MessageListResponse::Data::Role }
|
|
29
|
+
# @!attribute sent_at
|
|
30
|
+
# The datetime the message was sent to the end user.
|
|
31
|
+
#
|
|
32
|
+
# @return [Time, nil]
|
|
33
|
+
optional :sent_at, Time
|
|
30
34
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
# @!attribute tool_calls
|
|
36
|
+
# Optional tool calls made by the assistant.
|
|
37
|
+
#
|
|
38
|
+
# @return [Array<Telnyx::Models::AI::Conversations::MessageListResponse::ToolCall>, nil]
|
|
39
|
+
optional :tool_calls,
|
|
40
|
+
-> { Telnyx::Internal::Type::ArrayOf[Telnyx::Models::AI::Conversations::MessageListResponse::ToolCall] }
|
|
36
41
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
# @!method initialize(role:, text:, created_at: nil, sent_at: nil, tool_calls: nil)
|
|
43
|
+
# Some parameter documentations has been truncated, see
|
|
44
|
+
# {Telnyx::Models::AI::Conversations::MessageListResponse} for more details.
|
|
45
|
+
#
|
|
46
|
+
# @param role [Symbol, Telnyx::Models::AI::Conversations::MessageListResponse::Role] The role of the message sender.
|
|
47
|
+
#
|
|
48
|
+
# @param text [String] The message content. Can be null for tool calls.
|
|
49
|
+
#
|
|
50
|
+
# @param created_at [Time] The datetime the message was created on the conversation. This does not necesari
|
|
51
|
+
#
|
|
52
|
+
# @param sent_at [Time] The datetime the message was sent to the end user.
|
|
53
|
+
#
|
|
54
|
+
# @param tool_calls [Array<Telnyx::Models::AI::Conversations::MessageListResponse::ToolCall>] Optional tool calls made by the assistant.
|
|
44
55
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
56
|
+
# The role of the message sender.
|
|
57
|
+
#
|
|
58
|
+
# @see Telnyx::Models::AI::Conversations::MessageListResponse#role
|
|
59
|
+
module Role
|
|
60
|
+
extend Telnyx::Internal::Type::Enum
|
|
50
61
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
# @return [Array<Telnyx::Models::AI::Conversations::MessageListResponse::Data::ToolCall>, nil]
|
|
55
|
-
optional :tool_calls,
|
|
56
|
-
-> { Telnyx::Internal::Type::ArrayOf[Telnyx::Models::AI::Conversations::MessageListResponse::Data::ToolCall] }
|
|
62
|
+
USER = :user
|
|
63
|
+
ASSISTANT = :assistant
|
|
64
|
+
TOOL = :tool
|
|
57
65
|
|
|
58
|
-
# @!method
|
|
59
|
-
#
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
#
|
|
64
|
-
#
|
|
65
|
-
#
|
|
66
|
-
# @param created_at [Time] The datetime the message was created on the conversation. This does not necesari
|
|
67
|
-
#
|
|
68
|
-
# @param sent_at [Time] The datetime the message was sent to the end user.
|
|
66
|
+
# @!method self.values
|
|
67
|
+
# @return [Array<Symbol>]
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
class ToolCall < Telnyx::Internal::Type::BaseModel
|
|
71
|
+
# @!attribute id
|
|
72
|
+
# Unique identifier for the tool call.
|
|
69
73
|
#
|
|
70
|
-
# @
|
|
74
|
+
# @return [String]
|
|
75
|
+
required :id, String
|
|
71
76
|
|
|
72
|
-
#
|
|
77
|
+
# @!attribute function
|
|
73
78
|
#
|
|
74
|
-
#
|
|
75
|
-
|
|
76
|
-
extend Telnyx::Internal::Type::Enum
|
|
79
|
+
# @return [Telnyx::Models::AI::Conversations::MessageListResponse::ToolCall::Function]
|
|
80
|
+
required :function, -> { Telnyx::Models::AI::Conversations::MessageListResponse::ToolCall::Function }
|
|
77
81
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
82
|
+
# @!attribute type
|
|
83
|
+
# Type of the tool call.
|
|
84
|
+
#
|
|
85
|
+
# @return [Symbol, Telnyx::Models::AI::Conversations::MessageListResponse::ToolCall::Type]
|
|
86
|
+
required :type, enum: -> { Telnyx::Models::AI::Conversations::MessageListResponse::ToolCall::Type }
|
|
81
87
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
88
|
+
# @!method initialize(id:, function:, type:)
|
|
89
|
+
# @param id [String] Unique identifier for the tool call.
|
|
90
|
+
#
|
|
91
|
+
# @param function [Telnyx::Models::AI::Conversations::MessageListResponse::ToolCall::Function]
|
|
92
|
+
#
|
|
93
|
+
# @param type [Symbol, Telnyx::Models::AI::Conversations::MessageListResponse::ToolCall::Type] Type of the tool call.
|
|
85
94
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
#
|
|
95
|
+
# @see Telnyx::Models::AI::Conversations::MessageListResponse::ToolCall#function
|
|
96
|
+
class Function < Telnyx::Internal::Type::BaseModel
|
|
97
|
+
# @!attribute arguments
|
|
98
|
+
# JSON-formatted arguments to pass to the function.
|
|
89
99
|
#
|
|
90
100
|
# @return [String]
|
|
91
|
-
required :
|
|
101
|
+
required :arguments, String
|
|
92
102
|
|
|
93
|
-
# @!attribute
|
|
103
|
+
# @!attribute name
|
|
104
|
+
# Name of the function to call.
|
|
94
105
|
#
|
|
95
|
-
# @return [
|
|
96
|
-
required :
|
|
97
|
-
-> { Telnyx::Models::AI::Conversations::MessageListResponse::Data::ToolCall::Function }
|
|
106
|
+
# @return [String]
|
|
107
|
+
required :name, String
|
|
98
108
|
|
|
99
|
-
# @!
|
|
100
|
-
#
|
|
109
|
+
# @!method initialize(arguments:, name:)
|
|
110
|
+
# @param arguments [String] JSON-formatted arguments to pass to the function.
|
|
101
111
|
#
|
|
102
|
-
# @
|
|
103
|
-
|
|
112
|
+
# @param name [String] Name of the function to call.
|
|
113
|
+
end
|
|
104
114
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
# @param type [Symbol, Telnyx::Models::AI::Conversations::MessageListResponse::Data::ToolCall::Type] Type of the tool call.
|
|
111
|
-
|
|
112
|
-
# @see Telnyx::Models::AI::Conversations::MessageListResponse::Data::ToolCall#function
|
|
113
|
-
class Function < Telnyx::Internal::Type::BaseModel
|
|
114
|
-
# @!attribute arguments
|
|
115
|
-
# JSON-formatted arguments to pass to the function.
|
|
116
|
-
#
|
|
117
|
-
# @return [String]
|
|
118
|
-
required :arguments, String
|
|
119
|
-
|
|
120
|
-
# @!attribute name
|
|
121
|
-
# Name of the function to call.
|
|
122
|
-
#
|
|
123
|
-
# @return [String]
|
|
124
|
-
required :name, String
|
|
125
|
-
|
|
126
|
-
# @!method initialize(arguments:, name:)
|
|
127
|
-
# @param arguments [String] JSON-formatted arguments to pass to the function.
|
|
128
|
-
#
|
|
129
|
-
# @param name [String] Name of the function to call.
|
|
130
|
-
end
|
|
131
|
-
|
|
132
|
-
# Type of the tool call.
|
|
133
|
-
#
|
|
134
|
-
# @see Telnyx::Models::AI::Conversations::MessageListResponse::Data::ToolCall#type
|
|
135
|
-
module Type
|
|
136
|
-
extend Telnyx::Internal::Type::Enum
|
|
115
|
+
# Type of the tool call.
|
|
116
|
+
#
|
|
117
|
+
# @see Telnyx::Models::AI::Conversations::MessageListResponse::ToolCall#type
|
|
118
|
+
module Type
|
|
119
|
+
extend Telnyx::Internal::Type::Enum
|
|
137
120
|
|
|
138
|
-
|
|
121
|
+
FUNCTION = :function
|
|
139
122
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
end
|
|
123
|
+
# @!method self.values
|
|
124
|
+
# @return [Array<Symbol>]
|
|
143
125
|
end
|
|
144
126
|
end
|
|
145
127
|
end
|
|
@@ -52,7 +52,9 @@ module Telnyx
|
|
|
52
52
|
|
|
53
53
|
# @!attribute answering_machine_detection_config
|
|
54
54
|
# Optional configuration parameters to modify 'answering_machine_detection'
|
|
55
|
-
# performance.
|
|
55
|
+
# performance. Only `total_analysis_time_millis` and `greeting_duration_millis`
|
|
56
|
+
# parameters are applicable when `premium` is selected as
|
|
57
|
+
# answering_machine_detection.
|
|
56
58
|
#
|
|
57
59
|
# @return [Telnyx::Models::CallDialParams::AnsweringMachineDetectionConfig, nil]
|
|
58
60
|
optional :answering_machine_detection_config,
|
|
@@ -693,7 +695,9 @@ module Telnyx
|
|
|
693
695
|
# details.
|
|
694
696
|
#
|
|
695
697
|
# Optional configuration parameters to modify 'answering_machine_detection'
|
|
696
|
-
# performance.
|
|
698
|
+
# performance. Only `total_analysis_time_millis` and `greeting_duration_millis`
|
|
699
|
+
# parameters are applicable when `premium` is selected as
|
|
700
|
+
# answering_machine_detection.
|
|
697
701
|
#
|
|
698
702
|
# @param after_greeting_silence_millis [Integer] Silence duration threshold after a greeting message or voice for it be considere
|
|
699
703
|
#
|
|
@@ -34,7 +34,9 @@ module Telnyx
|
|
|
34
34
|
|
|
35
35
|
# @!attribute answering_machine_detection_config
|
|
36
36
|
# Optional configuration parameters to modify 'answering_machine_detection'
|
|
37
|
-
# performance.
|
|
37
|
+
# performance. Only `total_analysis_time_millis` and `greeting_duration_millis`
|
|
38
|
+
# parameters are applicable when `premium` is selected as
|
|
39
|
+
# answering_machine_detection.
|
|
38
40
|
#
|
|
39
41
|
# @return [Telnyx::Models::Calls::ActionTransferParams::AnsweringMachineDetectionConfig, nil]
|
|
40
42
|
optional :answering_machine_detection_config,
|
|
@@ -474,7 +476,9 @@ module Telnyx
|
|
|
474
476
|
# for more details.
|
|
475
477
|
#
|
|
476
478
|
# Optional configuration parameters to modify 'answering_machine_detection'
|
|
477
|
-
# performance.
|
|
479
|
+
# performance. Only `total_analysis_time_millis` and `greeting_duration_millis`
|
|
480
|
+
# parameters are applicable when `premium` is selected as
|
|
481
|
+
# answering_machine_detection.
|
|
478
482
|
#
|
|
479
483
|
# @param after_greeting_silence_millis [Integer] Silence duration threshold after a greeting message or voice for it be considere
|
|
480
484
|
#
|
|
@@ -9,20 +9,29 @@ module Telnyx
|
|
|
9
9
|
# Retrieve messages for a specific conversation, including tool calls made by the
|
|
10
10
|
# assistant.
|
|
11
11
|
#
|
|
12
|
-
# @overload list(conversation_id, request_options: {})
|
|
12
|
+
# @overload list(conversation_id, page_number: nil, page_size: nil, request_options: {})
|
|
13
13
|
#
|
|
14
14
|
# @param conversation_id [String]
|
|
15
|
+
#
|
|
16
|
+
# @param page_number [Integer] The page number to retrieve.
|
|
17
|
+
#
|
|
18
|
+
# @param page_size [Integer] The number of messages to return per page.
|
|
19
|
+
#
|
|
15
20
|
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
16
21
|
#
|
|
17
|
-
# @return [Telnyx::Models::AI::Conversations::MessageListResponse]
|
|
22
|
+
# @return [Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::AI::Conversations::MessageListResponse>]
|
|
18
23
|
#
|
|
19
24
|
# @see Telnyx::Models::AI::Conversations::MessageListParams
|
|
20
25
|
def list(conversation_id, params = {})
|
|
26
|
+
parsed, options = Telnyx::AI::Conversations::MessageListParams.dump_request(params)
|
|
27
|
+
query = Telnyx::Internal::Util.encode_query_params(parsed)
|
|
21
28
|
@client.request(
|
|
22
29
|
method: :get,
|
|
23
30
|
path: ["ai/conversations/%1$s/messages", conversation_id],
|
|
31
|
+
query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"),
|
|
32
|
+
page: Telnyx::Internal::DefaultFlatPagination,
|
|
24
33
|
model: Telnyx::Models::AI::Conversations::MessageListResponse,
|
|
25
|
-
options:
|
|
34
|
+
options: options
|
|
26
35
|
)
|
|
27
36
|
end
|
|
28
37
|
|
data/lib/telnyx/version.rb
CHANGED
|
@@ -19,19 +19,44 @@ module Telnyx
|
|
|
19
19
|
sig { returns(String) }
|
|
20
20
|
attr_accessor :conversation_id
|
|
21
21
|
|
|
22
|
+
# The page number to retrieve.
|
|
23
|
+
sig { returns(T.nilable(Integer)) }
|
|
24
|
+
attr_reader :page_number
|
|
25
|
+
|
|
26
|
+
sig { params(page_number: Integer).void }
|
|
27
|
+
attr_writer :page_number
|
|
28
|
+
|
|
29
|
+
# The number of messages to return per page.
|
|
30
|
+
sig { returns(T.nilable(Integer)) }
|
|
31
|
+
attr_reader :page_size
|
|
32
|
+
|
|
33
|
+
sig { params(page_size: Integer).void }
|
|
34
|
+
attr_writer :page_size
|
|
35
|
+
|
|
22
36
|
sig do
|
|
23
37
|
params(
|
|
24
38
|
conversation_id: String,
|
|
39
|
+
page_number: Integer,
|
|
40
|
+
page_size: Integer,
|
|
25
41
|
request_options: Telnyx::RequestOptions::OrHash
|
|
26
42
|
).returns(T.attached_class)
|
|
27
43
|
end
|
|
28
|
-
def self.new(
|
|
44
|
+
def self.new(
|
|
45
|
+
conversation_id:,
|
|
46
|
+
# The page number to retrieve.
|
|
47
|
+
page_number: nil,
|
|
48
|
+
# The number of messages to return per page.
|
|
49
|
+
page_size: nil,
|
|
50
|
+
request_options: {}
|
|
51
|
+
)
|
|
29
52
|
end
|
|
30
53
|
|
|
31
54
|
sig do
|
|
32
55
|
override.returns(
|
|
33
56
|
{
|
|
34
57
|
conversation_id: String,
|
|
58
|
+
page_number: Integer,
|
|
59
|
+
page_size: Integer,
|
|
35
60
|
request_options: Telnyx::RequestOptions
|
|
36
61
|
}
|
|
37
62
|
)
|