telnyx 5.166.0 → 5.167.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.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +12 -0
  3. data/README.md +1 -1
  4. data/lib/telnyx/internal/default_flat_pagination.rb +7 -3
  5. data/lib/telnyx/internal/default_flat_pagination_for_inexplicit_number_orders.rb +7 -3
  6. data/lib/telnyx/internal/default_flat_pagination_top_level_array.rb +10 -8
  7. data/lib/telnyx/internal/default_pagination_for_log_messages.rb +7 -3
  8. data/lib/telnyx/internal/default_pagination_for_messaging_tollfree.rb +12 -3
  9. data/lib/telnyx/internal/default_pagination_for_queues.rb +12 -3
  10. data/lib/telnyx/internal/per_page_pagination.rb +8 -1
  11. data/lib/telnyx/internal/per_page_pagination_v2.rb +8 -1
  12. data/lib/telnyx/internal/type/converter.rb +2 -0
  13. data/lib/telnyx/models/ai/anthropic/v1_messages_params.rb +57 -1
  14. data/lib/telnyx/models/ai/chat_completion_request.rb +61 -1
  15. data/lib/telnyx/models/ai/openai_create_response_params.rb +57 -1
  16. data/lib/telnyx/models/messaging_messaging_profile.rb +274 -0
  17. data/lib/telnyx/models/messaging_profile.rb +0 -1
  18. data/lib/telnyx/models/messaging_profile_create_response.rb +3 -3
  19. data/lib/telnyx/models/messaging_profile_delete_response.rb +3 -3
  20. data/lib/telnyx/models/messaging_profile_retrieve_response.rb +3 -3
  21. data/lib/telnyx/models/messaging_profile_update_params.rb +22 -1
  22. data/lib/telnyx/models/messaging_profile_update_response.rb +3 -3
  23. data/lib/telnyx/models/messaging_profiles/action_regenerate_secret_response.rb +3 -3
  24. data/lib/telnyx/models.rb +2 -0
  25. data/lib/telnyx/resources/ai/anthropic/v1.rb +5 -1
  26. data/lib/telnyx/resources/ai/openai/chat.rb +5 -1
  27. data/lib/telnyx/resources/ai/openai.rb +5 -1
  28. data/lib/telnyx/resources/messaging_profiles.rb +7 -3
  29. data/lib/telnyx/version.rb +1 -1
  30. data/lib/telnyx.rb +1 -0
  31. data/rbi/telnyx/models/ai/anthropic/v1_messages_params.rbi +139 -0
  32. data/rbi/telnyx/models/ai/chat_completion_request.rbi +116 -0
  33. data/rbi/telnyx/models/ai/openai_create_response_params.rbi +136 -0
  34. data/rbi/telnyx/models/messaging_messaging_profile.rbi +444 -0
  35. data/rbi/telnyx/models/messaging_profile.rbi +4 -6
  36. data/rbi/telnyx/models/messaging_profile_create_response.rbi +6 -4
  37. data/rbi/telnyx/models/messaging_profile_delete_response.rbi +6 -4
  38. data/rbi/telnyx/models/messaging_profile_retrieve_response.rbi +6 -4
  39. data/rbi/telnyx/models/messaging_profile_update_params.rbi +32 -0
  40. data/rbi/telnyx/models/messaging_profile_update_response.rbi +6 -4
  41. data/rbi/telnyx/models/messaging_profiles/action_regenerate_secret_response.rbi +4 -4
  42. data/rbi/telnyx/models.rbi +2 -0
  43. data/rbi/telnyx/resources/ai/anthropic/v1.rbi +14 -0
  44. data/rbi/telnyx/resources/ai/openai/chat.rbi +14 -0
  45. data/rbi/telnyx/resources/ai/openai.rbi +14 -0
  46. data/rbi/telnyx/resources/messaging_profiles.rbi +14 -1
  47. data/sig/telnyx/models/ai/anthropic/v1_messages_params.rbs +42 -0
  48. data/sig/telnyx/models/ai/chat_completion_request.rbs +42 -0
  49. data/sig/telnyx/models/ai/openai_create_response_params.rbs +42 -0
  50. data/sig/telnyx/models/messaging_messaging_profile.rbs +207 -0
  51. data/sig/telnyx/models/messaging_profile_create_response.rbs +8 -5
  52. data/sig/telnyx/models/messaging_profile_delete_response.rbs +8 -5
  53. data/sig/telnyx/models/messaging_profile_retrieve_response.rbs +7 -5
  54. data/sig/telnyx/models/messaging_profile_update_params.rbs +14 -0
  55. data/sig/telnyx/models/messaging_profile_update_response.rbs +8 -5
  56. data/sig/telnyx/models/messaging_profiles/action_regenerate_secret_response.rbs +7 -5
  57. data/sig/telnyx/models.rbs +2 -0
  58. data/sig/telnyx/resources/ai/anthropic/v1.rbs +2 -0
  59. data/sig/telnyx/resources/ai/openai/chat.rbs +2 -0
  60. data/sig/telnyx/resources/ai/openai.rbs +2 -0
  61. data/sig/telnyx/resources/messaging_profiles.rbs +3 -1
  62. metadata +5 -2
@@ -0,0 +1,274 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Models
5
+ # @see Telnyx::Resources::MessagingProfiles#list
6
+ class MessagingMessagingProfile < Telnyx::Internal::Type::BaseModel
7
+ # @!attribute ai_assistant_id
8
+ # The AI assistant ID associated with this messaging profile.
9
+ #
10
+ # @return [String, nil]
11
+ optional :ai_assistant_id, String, nil?: true
12
+
13
+ # @!attribute alpha_sender
14
+ # The alphanumeric sender ID to use when sending to destinations that require an
15
+ # alphanumeric sender ID.
16
+ #
17
+ # @return [String, nil]
18
+ optional :alpha_sender, String, nil?: true
19
+
20
+ # @!attribute daily_spend_limit
21
+ # The maximum amount of money (in USD) that can be spent by this profile before
22
+ # midnight UTC.
23
+ #
24
+ # @return [String, nil]
25
+ optional :daily_spend_limit, String
26
+
27
+ # @!attribute daily_spend_limit_enabled
28
+ # Whether to enforce the value configured by `daily_spend_limit`.
29
+ #
30
+ # @return [Boolean, nil]
31
+ optional :daily_spend_limit_enabled, Telnyx::Internal::Type::Boolean
32
+
33
+ # @!attribute enabled
34
+ # Specifies whether the messaging profile is enabled or not.
35
+ #
36
+ # @return [Boolean, nil]
37
+ optional :enabled, Telnyx::Internal::Type::Boolean
38
+
39
+ # @!attribute health_webhook_url
40
+ # DEPRECATED: health check url service checking
41
+ #
42
+ # @return [String, nil]
43
+ optional :health_webhook_url, String, nil?: true
44
+
45
+ # @!attribute mms_fall_back_to_sms
46
+ # enables SMS fallback for MMS messages.
47
+ #
48
+ # @return [Boolean, nil]
49
+ optional :mms_fall_back_to_sms, Telnyx::Internal::Type::Boolean
50
+
51
+ # @!attribute mms_transcoding
52
+ # enables automated resizing of MMS media.
53
+ #
54
+ # @return [Boolean, nil]
55
+ optional :mms_transcoding, Telnyx::Internal::Type::Boolean
56
+
57
+ # @!attribute mobile_only
58
+ # Send messages only to mobile phone numbers.
59
+ #
60
+ # @return [Boolean, nil]
61
+ optional :mobile_only, Telnyx::Internal::Type::Boolean
62
+
63
+ # @!attribute name
64
+ # A user friendly name for the messaging profile.
65
+ #
66
+ # @return [String, nil]
67
+ optional :name, String
68
+
69
+ # @!attribute number_pool_settings
70
+ # Number Pool allows you to send messages from a pool of numbers of different
71
+ # types, assigning weights to each type. The pool consists of all the long code
72
+ # and toll free numbers assigned to the messaging profile.
73
+ #
74
+ # To disable this feature, set the object field to `null`.
75
+ #
76
+ # @return [Telnyx::Models::NumberPoolSettings, nil]
77
+ optional :number_pool_settings, -> { Telnyx::NumberPoolSettings }, nil?: true
78
+
79
+ # @!attribute organization_id
80
+ # The organization that owns this messaging profile.
81
+ #
82
+ # @return [String, nil]
83
+ optional :organization_id, String
84
+
85
+ # @!attribute redaction_enabled
86
+ # Indicates whether message content redaction is enabled for this profile. When
87
+ # enabled, message text, MMS media, and the counterparty phone number are redacted
88
+ # in message records and reporting. Requires organization activation — contact
89
+ # support to enable. The field is only present in responses for organizations with
90
+ # redaction access.
91
+ #
92
+ # @return [Boolean, nil]
93
+ optional :redaction_enabled, Telnyx::Internal::Type::Boolean
94
+
95
+ # @!attribute redaction_level
96
+ # Determines how much information is redacted for privacy or compliance purposes.
97
+ # Level 1: message records and reporting are redacted, but inbound webhook
98
+ # payloads are not. Level 2 (default): message records, reporting, and inbound
99
+ # webhook payloads are all redacted.
100
+ #
101
+ # @return [Integer, nil]
102
+ optional :redaction_level, Integer
103
+
104
+ # @!attribute resource_group_id
105
+ # The resource group ID associated with this messaging profile.
106
+ #
107
+ # @return [String, nil]
108
+ optional :resource_group_id, String, nil?: true
109
+
110
+ # @!attribute smart_encoding
111
+ # Enables automatic character encoding optimization for SMS messages. When
112
+ # enabled, the system automatically selects the most efficient encoding (GSM-7 or
113
+ # UCS-2) based on message content to maximize character limits and minimize costs.
114
+ #
115
+ # @return [Boolean, nil]
116
+ optional :smart_encoding, Telnyx::Internal::Type::Boolean
117
+
118
+ # @!attribute url_shortener_settings
119
+ # The URL shortener feature allows automatic replacement of URLs that were
120
+ # generated using a public URL shortener service. Some examples include bit.do,
121
+ # bit.ly, goo.gl, ht.ly, is.gd, ow.ly, rebrand.ly, t.co, tiny.cc, and tinyurl.com.
122
+ # Such URLs are replaced with with links generated by Telnyx. The use of custom
123
+ # links can improve branding and message deliverability.
124
+ #
125
+ # To disable this feature, set the object field to `null`.
126
+ #
127
+ # @return [Telnyx::Models::URLShortenerSettings, nil]
128
+ optional :url_shortener_settings, -> { Telnyx::URLShortenerSettings }, nil?: true
129
+
130
+ # @!attribute v1_secret
131
+ # Secret used to authenticate with v1 endpoints.
132
+ #
133
+ # @return [String, nil]
134
+ optional :v1_secret, String
135
+
136
+ # @!attribute webhook_api_version
137
+ # Determines which webhook format will be used, Telnyx API v1, v2, or a legacy
138
+ # 2010-04-01 format.
139
+ #
140
+ # @return [Symbol, Telnyx::Models::MessagingMessagingProfile::WebhookAPIVersion, nil]
141
+ optional :webhook_api_version, enum: -> { Telnyx::MessagingMessagingProfile::WebhookAPIVersion }
142
+
143
+ # @!attribute webhook_failover_url
144
+ # The failover URL where webhooks related to this messaging profile will be sent
145
+ # if sending to the primary URL fails.
146
+ #
147
+ # @return [String, nil]
148
+ optional :webhook_failover_url, String, nil?: true
149
+
150
+ # @!attribute webhook_url
151
+ # The URL where webhooks related to this messaging profile will be sent.
152
+ #
153
+ # @return [String, nil]
154
+ optional :webhook_url, String, nil?: true
155
+
156
+ # @!attribute whitelisted_destinations
157
+ # Destinations to which the messaging profile is allowed to send. The elements in
158
+ # the list must be valid ISO 3166-1 alpha-2 country codes. If set to `["*"]`, all
159
+ # destinations will be allowed.
160
+ #
161
+ # @return [Array<String>, nil]
162
+ optional :whitelisted_destinations, Telnyx::Internal::Type::ArrayOf[String]
163
+
164
+ response_only do
165
+ # @!attribute id
166
+ # Identifies the type of resource.
167
+ #
168
+ # @return [String, nil]
169
+ optional :id, String
170
+
171
+ # @!attribute created_at
172
+ # ISO 8601 formatted date indicating when the resource was created.
173
+ #
174
+ # @return [Time, nil]
175
+ optional :created_at, Time
176
+
177
+ # @!attribute record_type
178
+ # Identifies the type of the resource.
179
+ #
180
+ # @return [Symbol, Telnyx::Models::MessagingMessagingProfile::RecordType, nil]
181
+ optional :record_type, enum: -> { Telnyx::MessagingMessagingProfile::RecordType }
182
+
183
+ # @!attribute updated_at
184
+ # ISO 8601 formatted date indicating when the resource was updated.
185
+ #
186
+ # @return [Time, nil]
187
+ optional :updated_at, Time
188
+ end
189
+
190
+ # @!method initialize(id: nil, ai_assistant_id: nil, alpha_sender: nil, created_at: nil, daily_spend_limit: nil, daily_spend_limit_enabled: nil, enabled: nil, health_webhook_url: nil, mms_fall_back_to_sms: nil, mms_transcoding: nil, mobile_only: nil, name: nil, number_pool_settings: nil, organization_id: nil, record_type: nil, redaction_enabled: nil, redaction_level: nil, resource_group_id: nil, smart_encoding: nil, updated_at: nil, url_shortener_settings: nil, v1_secret: nil, webhook_api_version: nil, webhook_failover_url: nil, webhook_url: nil, whitelisted_destinations: nil)
191
+ # Some parameter documentations has been truncated, see
192
+ # {Telnyx::Models::MessagingMessagingProfile} for more details.
193
+ #
194
+ # @param id [String] Identifies the type of resource.
195
+ #
196
+ # @param ai_assistant_id [String, nil] The AI assistant ID associated with this messaging profile.
197
+ #
198
+ # @param alpha_sender [String, nil] The alphanumeric sender ID to use when sending to destinations that require an a
199
+ #
200
+ # @param created_at [Time] ISO 8601 formatted date indicating when the resource was created.
201
+ #
202
+ # @param daily_spend_limit [String] The maximum amount of money (in USD) that can be spent by this profile before mi
203
+ #
204
+ # @param daily_spend_limit_enabled [Boolean] Whether to enforce the value configured by `daily_spend_limit`.
205
+ #
206
+ # @param enabled [Boolean] Specifies whether the messaging profile is enabled or not.
207
+ #
208
+ # @param health_webhook_url [String, nil] DEPRECATED: health check url service checking
209
+ #
210
+ # @param mms_fall_back_to_sms [Boolean] enables SMS fallback for MMS messages.
211
+ #
212
+ # @param mms_transcoding [Boolean] enables automated resizing of MMS media.
213
+ #
214
+ # @param mobile_only [Boolean] Send messages only to mobile phone numbers.
215
+ #
216
+ # @param name [String] A user friendly name for the messaging profile.
217
+ #
218
+ # @param number_pool_settings [Telnyx::Models::NumberPoolSettings, nil] Number Pool allows you to send messages from a pool of numbers of different type
219
+ #
220
+ # @param organization_id [String] The organization that owns this messaging profile.
221
+ #
222
+ # @param record_type [Symbol, Telnyx::Models::MessagingMessagingProfile::RecordType] Identifies the type of the resource.
223
+ #
224
+ # @param redaction_enabled [Boolean] Indicates whether message content redaction is enabled for this profile. When en
225
+ #
226
+ # @param redaction_level [Integer] Determines how much information is redacted for privacy or compliance purposes.
227
+ #
228
+ # @param resource_group_id [String, nil] The resource group ID associated with this messaging profile.
229
+ #
230
+ # @param smart_encoding [Boolean] Enables automatic character encoding optimization for SMS messages. When enabled
231
+ #
232
+ # @param updated_at [Time] ISO 8601 formatted date indicating when the resource was updated.
233
+ #
234
+ # @param url_shortener_settings [Telnyx::Models::URLShortenerSettings, nil] The URL shortener feature allows automatic replacement of URLs that were generat
235
+ #
236
+ # @param v1_secret [String] Secret used to authenticate with v1 endpoints.
237
+ #
238
+ # @param webhook_api_version [Symbol, Telnyx::Models::MessagingMessagingProfile::WebhookAPIVersion] Determines which webhook format will be used, Telnyx API v1, v2, or a legacy 201
239
+ #
240
+ # @param webhook_failover_url [String, nil] The failover URL where webhooks related to this messaging profile will be sent i
241
+ #
242
+ # @param webhook_url [String, nil] The URL where webhooks related to this messaging profile will be sent.
243
+ #
244
+ # @param whitelisted_destinations [Array<String>] Destinations to which the messaging profile is allowed to send. The elements in
245
+
246
+ # Identifies the type of the resource.
247
+ #
248
+ # @see Telnyx::Models::MessagingMessagingProfile#record_type
249
+ module RecordType
250
+ extend Telnyx::Internal::Type::Enum
251
+
252
+ MESSAGING_PROFILE = :messaging_profile
253
+
254
+ # @!method self.values
255
+ # @return [Array<Symbol>]
256
+ end
257
+
258
+ # Determines which webhook format will be used, Telnyx API v1, v2, or a legacy
259
+ # 2010-04-01 format.
260
+ #
261
+ # @see Telnyx::Models::MessagingMessagingProfile#webhook_api_version
262
+ module WebhookAPIVersion
263
+ extend Telnyx::Internal::Type::Enum
264
+
265
+ V1 = :"1"
266
+ V2 = :"2"
267
+ V2010_04_01 = :"2010-04-01"
268
+
269
+ # @!method self.values
270
+ # @return [Array<Symbol>]
271
+ end
272
+ end
273
+ end
274
+ end
@@ -2,7 +2,6 @@
2
2
 
3
3
  module Telnyx
4
4
  module Models
5
- # @see Telnyx::Resources::MessagingProfiles#list
6
5
  class MessagingProfile < Telnyx::Internal::Type::BaseModel
7
6
  # @!attribute ai_assistant_id
8
7
  # The AI assistant ID associated with this messaging profile.
@@ -6,11 +6,11 @@ module Telnyx
6
6
  class MessagingProfileCreateResponse < Telnyx::Internal::Type::BaseModel
7
7
  # @!attribute data
8
8
  #
9
- # @return [Telnyx::Models::MessagingProfile, nil]
10
- optional :data, -> { Telnyx::MessagingProfile }
9
+ # @return [Telnyx::Models::MessagingMessagingProfile, nil]
10
+ optional :data, -> { Telnyx::MessagingMessagingProfile }
11
11
 
12
12
  # @!method initialize(data: nil)
13
- # @param data [Telnyx::Models::MessagingProfile]
13
+ # @param data [Telnyx::Models::MessagingMessagingProfile]
14
14
  end
15
15
  end
16
16
  end
@@ -6,11 +6,11 @@ module Telnyx
6
6
  class MessagingProfileDeleteResponse < Telnyx::Internal::Type::BaseModel
7
7
  # @!attribute data
8
8
  #
9
- # @return [Telnyx::Models::MessagingProfile, nil]
10
- optional :data, -> { Telnyx::MessagingProfile }
9
+ # @return [Telnyx::Models::MessagingMessagingProfile, nil]
10
+ optional :data, -> { Telnyx::MessagingMessagingProfile }
11
11
 
12
12
  # @!method initialize(data: nil)
13
- # @param data [Telnyx::Models::MessagingProfile]
13
+ # @param data [Telnyx::Models::MessagingMessagingProfile]
14
14
  end
15
15
  end
16
16
  end
@@ -6,11 +6,11 @@ module Telnyx
6
6
  class MessagingProfileRetrieveResponse < Telnyx::Internal::Type::BaseModel
7
7
  # @!attribute data
8
8
  #
9
- # @return [Telnyx::Models::MessagingProfile, nil]
10
- optional :data, -> { Telnyx::MessagingProfile }
9
+ # @return [Telnyx::Models::MessagingMessagingProfile, nil]
10
+ optional :data, -> { Telnyx::MessagingMessagingProfile }
11
11
 
12
12
  # @!method initialize(data: nil)
13
- # @param data [Telnyx::Models::MessagingProfile]
13
+ # @param data [Telnyx::Models::MessagingMessagingProfile]
14
14
  end
15
15
  end
16
16
  end
@@ -78,6 +78,23 @@ module Telnyx
78
78
  # @return [Telnyx::Models::NumberPoolSettings, nil]
79
79
  optional :number_pool_settings, -> { Telnyx::NumberPoolSettings }, nil?: true
80
80
 
81
+ # @!attribute redaction_enabled
82
+ # Set to true to enable message content redaction on this profile, or false to
83
+ # disable it. Ignored if the organization is not on the redaction allowlist. See
84
+ # the [Message Redaction guide](/docs/messaging/messages/message-redaction) for
85
+ # what is redacted.
86
+ #
87
+ # @return [Boolean, nil]
88
+ optional :redaction_enabled, Telnyx::Internal::Type::Boolean
89
+
90
+ # @!attribute redaction_level
91
+ # The redaction level to apply when redaction is enabled. 1: redact message
92
+ # records and reporting only. 2 (default): also redact inbound webhook payloads.
93
+ # See the [Message Redaction guide](/docs/messaging/messages/message-redaction).
94
+ #
95
+ # @return [Integer, nil]
96
+ optional :redaction_level, Integer
97
+
81
98
  # @!attribute smart_encoding
82
99
  # Enables automatic character encoding optimization for SMS messages. When
83
100
  # enabled, the system automatically selects the most efficient encoding (GSM-7 or
@@ -134,7 +151,7 @@ module Telnyx
134
151
  # @return [Array<String>, nil]
135
152
  optional :whitelisted_destinations, Telnyx::Internal::Type::ArrayOf[String]
136
153
 
137
- # @!method initialize(messaging_profile_id:, ai_assistant_id: nil, alpha_sender: nil, daily_spend_limit: nil, daily_spend_limit_enabled: nil, enabled: nil, mms_fall_back_to_sms: nil, mms_transcoding: nil, mobile_only: nil, name: nil, number_pool_settings: nil, smart_encoding: nil, url_shortener_settings: nil, v1_secret: nil, webhook_api_version: nil, webhook_failover_url: nil, webhook_url: nil, whitelisted_destinations: nil, request_options: {})
154
+ # @!method initialize(messaging_profile_id:, ai_assistant_id: nil, alpha_sender: nil, daily_spend_limit: nil, daily_spend_limit_enabled: nil, enabled: nil, mms_fall_back_to_sms: nil, mms_transcoding: nil, mobile_only: nil, name: nil, number_pool_settings: nil, redaction_enabled: nil, redaction_level: nil, smart_encoding: nil, url_shortener_settings: nil, v1_secret: nil, webhook_api_version: nil, webhook_failover_url: nil, webhook_url: nil, whitelisted_destinations: nil, request_options: {})
138
155
  # Some parameter documentations has been truncated, see
139
156
  # {Telnyx::Models::MessagingProfileUpdateParams} for more details.
140
157
  #
@@ -160,6 +177,10 @@ module Telnyx
160
177
  #
161
178
  # @param number_pool_settings [Telnyx::Models::NumberPoolSettings, nil] Number Pool allows you to send messages from a pool of numbers of different type
162
179
  #
180
+ # @param redaction_enabled [Boolean] Set to true to enable message content redaction on this profile, or false to dis
181
+ #
182
+ # @param redaction_level [Integer] The redaction level to apply when redaction is enabled. 1: redact message record
183
+ #
163
184
  # @param smart_encoding [Boolean] Enables automatic character encoding optimization for SMS messages. When enabled
164
185
  #
165
186
  # @param url_shortener_settings [Telnyx::Models::URLShortenerSettings, nil] The URL shortener feature allows automatic replacement of URLs that were generat
@@ -6,11 +6,11 @@ module Telnyx
6
6
  class MessagingProfileUpdateResponse < Telnyx::Internal::Type::BaseModel
7
7
  # @!attribute data
8
8
  #
9
- # @return [Telnyx::Models::MessagingProfile, nil]
10
- optional :data, -> { Telnyx::MessagingProfile }
9
+ # @return [Telnyx::Models::MessagingMessagingProfile, nil]
10
+ optional :data, -> { Telnyx::MessagingMessagingProfile }
11
11
 
12
12
  # @!method initialize(data: nil)
13
- # @param data [Telnyx::Models::MessagingProfile]
13
+ # @param data [Telnyx::Models::MessagingMessagingProfile]
14
14
  end
15
15
  end
16
16
  end
@@ -7,11 +7,11 @@ module Telnyx
7
7
  class ActionRegenerateSecretResponse < Telnyx::Internal::Type::BaseModel
8
8
  # @!attribute data
9
9
  #
10
- # @return [Telnyx::Models::MessagingProfile, nil]
11
- optional :data, -> { Telnyx::MessagingProfile }
10
+ # @return [Telnyx::Models::MessagingMessagingProfile, nil]
11
+ optional :data, -> { Telnyx::MessagingMessagingProfile }
12
12
 
13
13
  # @!method initialize(data: nil)
14
- # @param data [Telnyx::Models::MessagingProfile]
14
+ # @param data [Telnyx::Models::MessagingMessagingProfile]
15
15
  end
16
16
  end
17
17
  end
data/lib/telnyx/models.rb CHANGED
@@ -1151,6 +1151,8 @@ module Telnyx
1151
1151
 
1152
1152
  MessagingInboundMessagePayload = Telnyx::Models::MessagingInboundMessagePayload
1153
1153
 
1154
+ MessagingMessagingProfile = Telnyx::Models::MessagingMessagingProfile
1155
+
1154
1156
  MessagingMetricsTimeFrame = Telnyx::Models::MessagingMetricsTimeFrame
1155
1157
 
1156
1158
  MessagingNumbersBulkUpdateCreateParams = Telnyx::Models::MessagingNumbersBulkUpdateCreateParams
@@ -20,7 +20,7 @@ module Telnyx
20
20
  # `content_block_start`, `content_block_delta`, `content_block_stop`,
21
21
  # `message_delta`, `message_stop`).
22
22
  #
23
- # @overload messages(max_tokens:, messages:, model:, api_key_ref: nil, billing_group_id: nil, fallback_config: nil, max_retries: nil, mcp_servers: nil, metadata: nil, service_tier: nil, stop_sequences: nil, stream: nil, system_: nil, temperature: nil, thinking: nil, timeout: nil, tool_choice: nil, tools: nil, top_k: nil, top_p: nil, request_options: {})
23
+ # @overload messages(max_tokens:, messages:, model:, api_key_ref: nil, billing_group_id: nil, fallback_config: nil, max_retries: nil, mcp_servers: nil, metadata: nil, mode: nil, region: nil, service_tier: nil, stop_sequences: nil, stream: nil, system_: nil, temperature: nil, thinking: nil, timeout: nil, tool_choice: nil, tools: nil, top_k: nil, top_p: nil, request_options: {})
24
24
  #
25
25
  # @param max_tokens [Integer] The maximum number of tokens to generate in the response.
26
26
  #
@@ -40,6 +40,10 @@ module Telnyx
40
40
  #
41
41
  # @param metadata [Hash{Symbol=>Object}] An object describing metadata about the request.
42
42
  #
43
+ # @param mode [Symbol, Telnyx::Models::AI::Anthropic::V1MessagesParams::Mode] How strictly `region` is applied. `preferred` (the default when `region` is set)
44
+ #
45
+ # @param region [Symbol, Telnyx::Models::AI::Anthropic::V1MessagesParams::Region] Optional data-residency region the request should be served from, using the same
46
+ #
43
47
  # @param service_tier [String] The service tier to use for this request. Supported values vary by model; use th
44
48
  #
45
49
  # @param stop_sequences [Array<String>] Custom sequences that will cause the model to stop generating.
@@ -13,7 +13,7 @@ module Telnyx
13
13
  # and may be used with the OpenAI JS or Python SDK by setting the base URL to
14
14
  # `https://api.telnyx.com/v2/ai/openai`.
15
15
  #
16
- # @overload create_completion(messages:, api_key_ref: nil, best_of: nil, early_stopping: nil, enable_thinking: nil, frequency_penalty: nil, guided_choice: nil, guided_json: nil, guided_regex: nil, length_penalty: nil, logprobs: nil, max_tokens: nil, min_p: nil, model: nil, n: nil, presence_penalty: nil, reasoning_effort: nil, response_format: nil, seed: nil, service_tier: nil, stop: nil, stream: nil, temperature: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, use_beam_search: nil, request_options: {})
16
+ # @overload create_completion(messages:, api_key_ref: nil, best_of: nil, early_stopping: nil, enable_thinking: nil, frequency_penalty: nil, guided_choice: nil, guided_json: nil, guided_regex: nil, length_penalty: nil, logprobs: nil, max_tokens: nil, min_p: nil, mode: nil, model: nil, n: nil, presence_penalty: nil, reasoning_effort: nil, region: nil, response_format: nil, seed: nil, service_tier: nil, stop: nil, stream: nil, temperature: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, use_beam_search: nil, request_options: {})
17
17
  #
18
18
  # @param messages [Array<Telnyx::Models::AI::ChatCompletionRequest::Message>] A list of the previous chat messages for context.
19
19
  #
@@ -41,6 +41,8 @@ module Telnyx
41
41
  #
42
42
  # @param min_p [Float] This is an alternative to `top_p` that [many prefer](https://github.com/huggingf
43
43
  #
44
+ # @param mode [Symbol, Telnyx::Models::AI::ChatCompletionRequest::Mode] How strictly `region` is applied. `preferred` (the default when `region` is set)
45
+ #
44
46
  # @param model [String] The language model to chat with.
45
47
  #
46
48
  # @param n [Float] This will return multiple choices for you instead of a single chat completion.
@@ -49,6 +51,8 @@ module Telnyx
49
51
  #
50
52
  # @param reasoning_effort [Symbol, Telnyx::Models::AI::ChatCompletionRequest::ReasoningEffort] Controls the reasoning effort for models that support it. When set, the model sp
51
53
  #
54
+ # @param region [Symbol, Telnyx::Models::AI::ChatCompletionRequest::Region] Optional data-residency region the request should be served from, using the same
55
+ #
52
56
  # @param response_format [Telnyx::Models::AI::ChatCompletionRequest::ResponseFormat] Use this is you want to guarantee a JSON output without defining a schema. For c
53
57
  #
54
58
  # @param seed [Integer] If specified, the system will make a best effort to sample deterministically, su
@@ -43,7 +43,7 @@ module Telnyx
43
43
  # tag the conversation's source, channel, or user) and later filter by it when
44
44
  # listing conversations.
45
45
  #
46
- # @overload create_response(conversation: nil, input: nil, instructions: nil, model: nil, reasoning: nil, service_tier: nil, stream: nil, request_options: {})
46
+ # @overload create_response(conversation: nil, input: nil, instructions: nil, mode: nil, model: nil, reasoning: nil, region: nil, service_tier: nil, stream: nil, request_options: {})
47
47
  #
48
48
  # @param conversation [String] Optional Telnyx Conversation ID from `POST /ai/conversations`. When provided, Te
49
49
  #
@@ -51,10 +51,14 @@ module Telnyx
51
51
  #
52
52
  # @param instructions [String] Optional system/developer instructions for the model. When used with a persisted
53
53
  #
54
+ # @param mode [Symbol, Telnyx::Models::AI::OpenAICreateResponseParams::Mode] How strictly `region` is applied. `preferred` (the default when `region` is set)
55
+ #
54
56
  # @param model [String] Model identifier to use for the response, for example `zai-org/GLM-5.1-FP8` or a
55
57
  #
56
58
  # @param reasoning [Telnyx::Models::AI::OpenAICreateResponseParams::Reasoning]
57
59
  #
60
+ # @param region [Symbol, Telnyx::Models::AI::OpenAICreateResponseParams::Region] Optional data-residency region the request should be served from, using the same
61
+ #
58
62
  # @param service_tier [String] The service tier to use for this request. Supported values vary by model; use `G
59
63
  #
60
64
  # @param stream [Boolean] Set to `true` to stream Server-Sent Events, matching OpenAI's Responses streamin
@@ -97,7 +97,7 @@ module Telnyx
97
97
  # Updates the supplied settings on the specified messaging profile. Settings
98
98
  # omitted from the request remain unchanged.
99
99
  #
100
- # @overload update(messaging_profile_id, ai_assistant_id: nil, alpha_sender: nil, daily_spend_limit: nil, daily_spend_limit_enabled: nil, enabled: nil, mms_fall_back_to_sms: nil, mms_transcoding: nil, mobile_only: nil, name: nil, number_pool_settings: nil, smart_encoding: nil, url_shortener_settings: nil, v1_secret: nil, webhook_api_version: nil, webhook_failover_url: nil, webhook_url: nil, whitelisted_destinations: nil, request_options: {})
100
+ # @overload update(messaging_profile_id, ai_assistant_id: nil, alpha_sender: nil, daily_spend_limit: nil, daily_spend_limit_enabled: nil, enabled: nil, mms_fall_back_to_sms: nil, mms_transcoding: nil, mobile_only: nil, name: nil, number_pool_settings: nil, redaction_enabled: nil, redaction_level: nil, smart_encoding: nil, url_shortener_settings: nil, v1_secret: nil, webhook_api_version: nil, webhook_failover_url: nil, webhook_url: nil, whitelisted_destinations: nil, request_options: {})
101
101
  #
102
102
  # @param messaging_profile_id [String] The id of the messaging profile to retrieve
103
103
  #
@@ -121,6 +121,10 @@ module Telnyx
121
121
  #
122
122
  # @param number_pool_settings [Telnyx::Models::NumberPoolSettings, nil] Number Pool allows you to send messages from a pool of numbers of different type
123
123
  #
124
+ # @param redaction_enabled [Boolean] Set to true to enable message content redaction on this profile, or false to dis
125
+ #
126
+ # @param redaction_level [Integer] The redaction level to apply when redaction is enabled. 1: redact message record
127
+ #
124
128
  # @param smart_encoding [Boolean] Enables automatic character encoding optimization for SMS messages. When enabled
125
129
  #
126
130
  # @param url_shortener_settings [Telnyx::Models::URLShortenerSettings, nil] The URL shortener feature allows automatic replacement of URLs that were generat
@@ -168,7 +172,7 @@ module Telnyx
168
172
  #
169
173
  # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
170
174
  #
171
- # @return [Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::MessagingProfile>]
175
+ # @return [Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::MessagingMessagingProfile>]
172
176
  #
173
177
  # @see Telnyx::Models::MessagingProfileListParams
174
178
  def list(params = {})
@@ -184,7 +188,7 @@ module Telnyx
184
188
  page_size: "page[size]"
185
189
  ),
186
190
  page: Telnyx::Internal::DefaultFlatPagination,
187
- model: Telnyx::MessagingProfile,
191
+ model: Telnyx::MessagingMessagingProfile,
188
192
  options: options
189
193
  )
190
194
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Telnyx
4
- VERSION = "5.166.0"
4
+ VERSION = "5.167.0"
5
5
  end
data/lib/telnyx.rb CHANGED
@@ -1652,6 +1652,7 @@ require_relative "telnyx/models/messaging_hosted_number_retrieve_response"
1652
1652
  require_relative "telnyx/models/messaging_hosted_number_update_params"
1653
1653
  require_relative "telnyx/models/messaging_hosted_number_update_response"
1654
1654
  require_relative "telnyx/models/messaging_inbound_message_payload"
1655
+ require_relative "telnyx/models/messaging_messaging_profile"
1655
1656
  require_relative "telnyx/models/messaging_metrics_time_frame"
1656
1657
  require_relative "telnyx/models/messaging_numbers_bulk_update_create_params"
1657
1658
  require_relative "telnyx/models/messaging_numbers_bulk_update_create_response"