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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 59e245d43f929435e99b241c00ea1ed9f63a82ed8be05cfde272e9c1c8bcf9ea
4
- data.tar.gz: e55cbe229e5f6fd49467da40f6358753dd05d062673141eef81b7a17c02943d1
3
+ metadata.gz: f7fb5e6708a25a947a58c8325f1169ed1e5eaa2a72f70b2910a02e80ed7ba715
4
+ data.tar.gz: b245bd720941ef0732a77fc2ada7b3b7cff57dcb811d640f77a55d0f8bac5f52
5
5
  SHA512:
6
- metadata.gz: b5859cfa565098e2b10e8dc245df6002fb7e60ec5cca968b01154052e9035ac568951039708c19864fee5592aa0faeb7c0fc65c88468d9ae242c669a1b02b2ca
7
- data.tar.gz: 4ece7fdc0338187af8677499069eb039489759d98947c5bce2c965a9a61b4e4fcc445a2540e29a9d5909c272deb6b4988dea55e7d88efe55e744d181943e4a41
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
@@ -24,7 +24,7 @@ To use this gem, install via Bundler by adding the following to your application
24
24
  <!-- x-release-please-start-version -->
25
25
 
26
26
  ```ruby
27
- gem "telnyx", "~> 5.76.0"
27
+ gem "telnyx", "~> 5.77.0"
28
28
  ```
29
29
 
30
30
  <!-- x-release-please-end -->
@@ -14,8 +14,25 @@ module Telnyx
14
14
  # @return [String]
15
15
  required :conversation_id, String
16
16
 
17
- # @!method initialize(conversation_id:, request_options: {})
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 data
9
+ # @!attribute role
10
+ # The role of the message sender.
10
11
  #
11
- # @return [Array<Telnyx::Models::AI::Conversations::MessageListResponse::Data>]
12
- required :data,
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 meta
15
+ # @!attribute text
16
+ # The message content. Can be null for tool calls.
16
17
  #
17
- # @return [Telnyx::Models::AI::Assistants::Tests::TestSuites::Meta]
18
- required :meta, -> { Telnyx::AI::Assistants::Tests::TestSuites::Meta }
18
+ # @return [String]
19
+ required :text, String
19
20
 
20
- # @!method initialize(data:, meta:)
21
- # @param data [Array<Telnyx::Models::AI::Conversations::MessageListResponse::Data>]
22
- # @param meta [Telnyx::Models::AI::Assistants::Tests::TestSuites::Meta]
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
- class Data < Telnyx::Internal::Type::BaseModel
25
- # @!attribute role
26
- # The role of the message sender.
27
- #
28
- # @return [Symbol, Telnyx::Models::AI::Conversations::MessageListResponse::Data::Role]
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
- # @!attribute text
32
- # The message content. Can be null for tool calls.
33
- #
34
- # @return [String]
35
- required :text, String
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
- # @!attribute created_at
38
- # The datetime the message was created on the conversation. This does not
39
- # necesarily correspond to the time the message was sent. The best field to use to
40
- # determine the time the end user experienced the message is `sent_at`.
41
- #
42
- # @return [Time, nil]
43
- optional :created_at, Time
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
- # @!attribute sent_at
46
- # The datetime the message was sent to the end user.
47
- #
48
- # @return [Time, nil]
49
- optional :sent_at, Time
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
- # @!attribute tool_calls
52
- # Optional tool calls made by the assistant.
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 initialize(role:, text:, created_at: nil, sent_at: nil, tool_calls: nil)
59
- # Some parameter documentations has been truncated, see
60
- # {Telnyx::Models::AI::Conversations::MessageListResponse::Data} for more details.
61
- #
62
- # @param role [Symbol, Telnyx::Models::AI::Conversations::MessageListResponse::Data::Role] The role of the message sender.
63
- #
64
- # @param text [String] The message content. Can be null for tool calls.
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
- # @param tool_calls [Array<Telnyx::Models::AI::Conversations::MessageListResponse::Data::ToolCall>] Optional tool calls made by the assistant.
74
+ # @return [String]
75
+ required :id, String
71
76
 
72
- # The role of the message sender.
77
+ # @!attribute function
73
78
  #
74
- # @see Telnyx::Models::AI::Conversations::MessageListResponse::Data#role
75
- module Role
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
- USER = :user
79
- ASSISTANT = :assistant
80
- TOOL = :tool
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
- # @!method self.values
83
- # @return [Array<Symbol>]
84
- end
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
- class ToolCall < Telnyx::Internal::Type::BaseModel
87
- # @!attribute id
88
- # Unique identifier for the tool call.
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 :id, String
101
+ required :arguments, String
92
102
 
93
- # @!attribute function
103
+ # @!attribute name
104
+ # Name of the function to call.
94
105
  #
95
- # @return [Telnyx::Models::AI::Conversations::MessageListResponse::Data::ToolCall::Function]
96
- required :function,
97
- -> { Telnyx::Models::AI::Conversations::MessageListResponse::Data::ToolCall::Function }
106
+ # @return [String]
107
+ required :name, String
98
108
 
99
- # @!attribute type
100
- # Type of the tool call.
109
+ # @!method initialize(arguments:, name:)
110
+ # @param arguments [String] JSON-formatted arguments to pass to the function.
101
111
  #
102
- # @return [Symbol, Telnyx::Models::AI::Conversations::MessageListResponse::Data::ToolCall::Type]
103
- required :type, enum: -> { Telnyx::Models::AI::Conversations::MessageListResponse::Data::ToolCall::Type }
112
+ # @param name [String] Name of the function to call.
113
+ end
104
114
 
105
- # @!method initialize(id:, function:, type:)
106
- # @param id [String] Unique identifier for the tool call.
107
- #
108
- # @param function [Telnyx::Models::AI::Conversations::MessageListResponse::Data::ToolCall::Function]
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
- FUNCTION = :function
121
+ FUNCTION = :function
139
122
 
140
- # @!method self.values
141
- # @return [Array<Symbol>]
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: params[:request_options]
34
+ options: options
26
35
  )
27
36
  end
28
37
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Telnyx
4
- VERSION = "5.76.0"
4
+ VERSION = "5.77.0"
5
5
  end
@@ -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(conversation_id:, request_options: {})
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
  )