telnyx 5.156.0 → 5.157.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 (145) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +1 -1
  4. data/lib/telnyx/models/ai/anthropic/v1_messages_params.rb +209 -0
  5. data/lib/telnyx/models/ai/anthropic/v1_messages_response.rb +12 -0
  6. data/lib/telnyx/models/ai/assistant_create_params.rb +2 -2
  7. data/lib/telnyx/models/ai/assistant_tool.rb +25 -1
  8. data/lib/telnyx/models/ai/assistant_update_params.rb +2 -2
  9. data/lib/telnyx/models/ai/assistants/update_assistant.rb +2 -2
  10. data/lib/telnyx/models/ai/conversations/conversation_insight_retrieve_aggregates_params.rb +103 -0
  11. data/lib/telnyx/models/ai/conversations/conversation_insight_retrieve_aggregates_response.rb +54 -0
  12. data/lib/telnyx/models/ai/inference_embedding.rb +6 -6
  13. data/lib/telnyx/models/ai/pay_tool_params.rb +46 -0
  14. data/lib/telnyx/models/ai/tool_create_params.rb +7 -1
  15. data/lib/telnyx/models/ai/tool_update_params.rb +7 -1
  16. data/lib/telnyx/models/ai/transcription_settings.rb +3 -3
  17. data/lib/telnyx/models/call_dial_params.rb +13 -1
  18. data/lib/telnyx/models/calls/transcription_config.rb +8 -4
  19. data/lib/telnyx/models/calls/transcription_engine_parakeet_config.rb +1 -1
  20. data/lib/telnyx/models/doc_reqs_requirement.rb +29 -4
  21. data/lib/telnyx/models/inbound_message.rb +278 -28
  22. data/lib/telnyx/models/inbound_message_webhook_event.rb +70 -3
  23. data/lib/telnyx/models/managed_account_list_params.rb +45 -3
  24. data/lib/telnyx/models/requirement_list_params.rb +10 -1
  25. data/lib/telnyx/models/requirement_retrieve_params.rb +14 -1
  26. data/lib/telnyx/models/speech_to_text_retrieve_transcription_params.rb +1 -1
  27. data/lib/telnyx/models/storage/cloudf_create_params.rb +56 -0
  28. data/lib/telnyx/models/storage/cloudf_delete_params.rb +22 -0
  29. data/lib/telnyx/models/storage/cloudf_list_params.rb +109 -0
  30. data/lib/telnyx/models/storage/cloudf_list_response.rb +165 -0
  31. data/lib/telnyx/models/storage/cloudf_retrieve_params.rb +22 -0
  32. data/lib/telnyx/models/storage/cloudf_update_params.rb +36 -0
  33. data/lib/telnyx/models/storage/cloudfs/action_rotate_meta_token_params.rb +30 -0
  34. data/lib/telnyx/models/storage/cloudfs_filesystem_detail_response_wrapper.rb +129 -0
  35. data/lib/telnyx/models/storage/cloudfs_filesystem_response_wrapper.rb +129 -0
  36. data/lib/telnyx/models/storage/cloudfs_filesystem_status.rb +28 -0
  37. data/lib/telnyx/models/verify_profile.rb +2 -2
  38. data/lib/telnyx/models/verify_profile_create_params.rb +2 -2
  39. data/lib/telnyx/models/verify_profile_update_params.rb +2 -2
  40. data/lib/telnyx/resources/ai/anthropic/v1.rb +91 -0
  41. data/lib/telnyx/resources/ai/anthropic.rb +20 -0
  42. data/lib/telnyx/resources/ai/assistants/versions.rb +1 -1
  43. data/lib/telnyx/resources/ai/assistants.rb +2 -2
  44. data/lib/telnyx/resources/ai/conversations/conversation_insights.rb +55 -0
  45. data/lib/telnyx/resources/ai/conversations.rb +5 -0
  46. data/lib/telnyx/resources/ai/tools.rb +5 -2
  47. data/lib/telnyx/resources/ai.rb +4 -0
  48. data/lib/telnyx/resources/calls.rb +3 -1
  49. data/lib/telnyx/resources/requirements.rb +13 -3
  50. data/lib/telnyx/resources/storage/cloudfs/actions.rb +54 -0
  51. data/lib/telnyx/resources/storage/cloudfs.rb +187 -0
  52. data/lib/telnyx/resources/storage.rb +6 -0
  53. data/lib/telnyx/version.rb +1 -1
  54. data/lib/telnyx.rb +20 -0
  55. data/rbi/telnyx/models/ai/anthropic/v1_messages_params.rbi +314 -0
  56. data/rbi/telnyx/models/ai/anthropic/v1_messages_response.rbi +15 -0
  57. data/rbi/telnyx/models/ai/assistant_create_params.rbi +8 -4
  58. data/rbi/telnyx/models/ai/assistant_tool.rbi +37 -1
  59. data/rbi/telnyx/models/ai/assistant_update_params.rbi +8 -4
  60. data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +8 -4
  61. data/rbi/telnyx/models/ai/conversations/conversation_insight_retrieve_aggregates_params.rbi +188 -0
  62. data/rbi/telnyx/models/ai/conversations/conversation_insight_retrieve_aggregates_response.rbi +94 -0
  63. data/rbi/telnyx/models/ai/inference_embedding.rbi +12 -6
  64. data/rbi/telnyx/models/ai/pay_tool_params.rbi +71 -0
  65. data/rbi/telnyx/models/ai/tool_create_params.rbi +9 -0
  66. data/rbi/telnyx/models/ai/tool_update_params.rbi +9 -0
  67. data/rbi/telnyx/models/ai/transcription_settings.rbi +5 -5
  68. data/rbi/telnyx/models/call_dial_params.rbi +19 -0
  69. data/rbi/telnyx/models/calls/transcription_config.rbi +15 -7
  70. data/rbi/telnyx/models/calls/transcription_engine_parakeet_config.rbi +2 -2
  71. data/rbi/telnyx/models/doc_reqs_requirement.rbi +38 -9
  72. data/rbi/telnyx/models/inbound_message.rbi +324 -58
  73. data/rbi/telnyx/models/inbound_message_webhook_event.rbi +173 -4
  74. data/rbi/telnyx/models/managed_account_list_params.rbi +130 -6
  75. data/rbi/telnyx/models/requirement_list_params.rbi +13 -0
  76. data/rbi/telnyx/models/requirement_retrieve_params.rbi +21 -2
  77. data/rbi/telnyx/models/speech_to_text_retrieve_transcription_params.rbi +2 -2
  78. data/rbi/telnyx/models/storage/cloudf_create_params.rbi +103 -0
  79. data/rbi/telnyx/models/storage/cloudf_delete_params.rbi +40 -0
  80. data/rbi/telnyx/models/storage/cloudf_list_params.rbi +232 -0
  81. data/rbi/telnyx/models/storage/cloudf_list_response.rbi +327 -0
  82. data/rbi/telnyx/models/storage/cloudf_retrieve_params.rbi +40 -0
  83. data/rbi/telnyx/models/storage/cloudf_update_params.rbi +61 -0
  84. data/rbi/telnyx/models/storage/cloudfs/action_rotate_meta_token_params.rbi +50 -0
  85. data/rbi/telnyx/models/storage/cloudfs_filesystem_detail_response_wrapper.rbi +229 -0
  86. data/rbi/telnyx/models/storage/cloudfs_filesystem_response_wrapper.rbi +227 -0
  87. data/rbi/telnyx/models/storage/cloudfs_filesystem_status.rbi +57 -0
  88. data/rbi/telnyx/models/verify_profile.rbi +2 -2
  89. data/rbi/telnyx/models/verify_profile_create_params.rbi +2 -2
  90. data/rbi/telnyx/models/verify_profile_update_params.rbi +2 -2
  91. data/rbi/telnyx/resources/ai/anthropic/v1.rbi +106 -0
  92. data/rbi/telnyx/resources/ai/anthropic.rbi +17 -0
  93. data/rbi/telnyx/resources/ai/assistants/versions.rbi +2 -1
  94. data/rbi/telnyx/resources/ai/assistants.rbi +4 -2
  95. data/rbi/telnyx/resources/ai/conversations/conversation_insights.rbi +68 -0
  96. data/rbi/telnyx/resources/ai/conversations.rbi +6 -0
  97. data/rbi/telnyx/resources/ai/tools.rbi +4 -0
  98. data/rbi/telnyx/resources/ai.rbi +3 -0
  99. data/rbi/telnyx/resources/calls.rbi +7 -0
  100. data/rbi/telnyx/resources/managed_accounts.rbi +1 -1
  101. data/rbi/telnyx/resources/requirements.rbi +8 -0
  102. data/rbi/telnyx/resources/storage/cloudfs/actions.rbi +46 -0
  103. data/rbi/telnyx/resources/storage/cloudfs.rbi +152 -0
  104. data/rbi/telnyx/resources/storage.rbi +5 -0
  105. data/sig/telnyx/models/ai/anthropic/v1_messages_params.rbs +175 -0
  106. data/sig/telnyx/models/ai/anthropic/v1_messages_response.rbs +11 -0
  107. data/sig/telnyx/models/ai/assistant_tool.rbs +13 -0
  108. data/sig/telnyx/models/ai/conversations/conversation_insight_retrieve_aggregates_params.rbs +74 -0
  109. data/sig/telnyx/models/ai/conversations/conversation_insight_retrieve_aggregates_response.rbs +34 -0
  110. data/sig/telnyx/models/ai/pay_tool_params.rbs +41 -0
  111. data/sig/telnyx/models/ai/tool_create_params.rbs +7 -0
  112. data/sig/telnyx/models/ai/tool_update_params.rbs +7 -0
  113. data/sig/telnyx/models/ai/transcription_settings.rbs +2 -2
  114. data/sig/telnyx/models/call_dial_params.rbs +7 -0
  115. data/sig/telnyx/models/calls/transcription_config.rbs +2 -2
  116. data/sig/telnyx/models/calls/transcription_engine_parakeet_config.rbs +2 -2
  117. data/sig/telnyx/models/doc_reqs_requirement.rbs +25 -8
  118. data/sig/telnyx/models/inbound_message.rbs +204 -35
  119. data/sig/telnyx/models/inbound_message_webhook_event.rbs +81 -5
  120. data/sig/telnyx/models/managed_account_list_params.rbs +47 -3
  121. data/sig/telnyx/models/requirement_list_params.rbs +8 -1
  122. data/sig/telnyx/models/requirement_retrieve_params.rbs +12 -2
  123. data/sig/telnyx/models/speech_to_text_retrieve_transcription_params.rbs +2 -2
  124. data/sig/telnyx/models/storage/cloudf_create_params.rbs +50 -0
  125. data/sig/telnyx/models/storage/cloudf_delete_params.rbs +22 -0
  126. data/sig/telnyx/models/storage/cloudf_list_params.rbs +112 -0
  127. data/sig/telnyx/models/storage/cloudf_list_response.rbs +163 -0
  128. data/sig/telnyx/models/storage/cloudf_retrieve_params.rbs +22 -0
  129. data/sig/telnyx/models/storage/cloudf_update_params.rbs +32 -0
  130. data/sig/telnyx/models/storage/cloudfs/action_rotate_meta_token_params.rbs +32 -0
  131. data/sig/telnyx/models/storage/cloudfs_filesystem_detail_response_wrapper.rbs +115 -0
  132. data/sig/telnyx/models/storage/cloudfs_filesystem_response_wrapper.rbs +115 -0
  133. data/sig/telnyx/models/storage/cloudfs_filesystem_status.rbs +21 -0
  134. data/sig/telnyx/resources/ai/anthropic/v1.rbs +35 -0
  135. data/sig/telnyx/resources/ai/anthropic.rbs +11 -0
  136. data/sig/telnyx/resources/ai/conversations/conversation_insights.rbs +20 -0
  137. data/sig/telnyx/resources/ai/conversations.rbs +2 -0
  138. data/sig/telnyx/resources/ai/tools.rbs +2 -0
  139. data/sig/telnyx/resources/ai.rbs +2 -0
  140. data/sig/telnyx/resources/calls.rbs +1 -0
  141. data/sig/telnyx/resources/requirements.rbs +2 -0
  142. data/sig/telnyx/resources/storage/cloudfs/actions.rbs +17 -0
  143. data/sig/telnyx/resources/storage/cloudfs.rbs +45 -0
  144. data/sig/telnyx/resources/storage.rbs +2 -0
  145. metadata +62 -2
@@ -0,0 +1,227 @@
1
+ # typed: strong
2
+
3
+ module Telnyx
4
+ module Models
5
+ module Storage
6
+ class CloudfsFilesystemResponseWrapper < Telnyx::Internal::Type::BaseModel
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(
10
+ Telnyx::Storage::CloudfsFilesystemResponseWrapper,
11
+ Telnyx::Internal::AnyHash
12
+ )
13
+ end
14
+
15
+ # A CloudFS filesystem, including its metadata credential. This shape is returned
16
+ # only by create and rotate-meta-token.
17
+ sig do
18
+ returns(
19
+ T.nilable(Telnyx::Storage::CloudfsFilesystemResponseWrapper::Data)
20
+ )
21
+ end
22
+ attr_reader :data
23
+
24
+ sig do
25
+ params(
26
+ data:
27
+ Telnyx::Storage::CloudfsFilesystemResponseWrapper::Data::OrHash
28
+ ).void
29
+ end
30
+ attr_writer :data
31
+
32
+ sig do
33
+ params(
34
+ data:
35
+ Telnyx::Storage::CloudfsFilesystemResponseWrapper::Data::OrHash
36
+ ).returns(T.attached_class)
37
+ end
38
+ def self.new(
39
+ # A CloudFS filesystem, including its metadata credential. This shape is returned
40
+ # only by create and rotate-meta-token.
41
+ data: nil
42
+ )
43
+ end
44
+
45
+ sig do
46
+ override.returns(
47
+ { data: Telnyx::Storage::CloudfsFilesystemResponseWrapper::Data }
48
+ )
49
+ end
50
+ def to_hash
51
+ end
52
+
53
+ class Data < Telnyx::Internal::Type::BaseModel
54
+ OrHash =
55
+ T.type_alias do
56
+ T.any(
57
+ Telnyx::Storage::CloudfsFilesystemResponseWrapper::Data,
58
+ Telnyx::Internal::AnyHash
59
+ )
60
+ end
61
+
62
+ sig { returns(T.nilable(String)) }
63
+ attr_reader :id
64
+
65
+ sig { params(id: String).void }
66
+ attr_writer :id
67
+
68
+ sig { returns(T.nilable(Time)) }
69
+ attr_reader :created_at
70
+
71
+ sig { params(created_at: Time).void }
72
+ attr_writer :created_at
73
+
74
+ # Metadata access token, in cleartext. Returned only by create and
75
+ # rotate-meta-token and not retrievable afterwards — store it securely.
76
+ sig { returns(T.nilable(String)) }
77
+ attr_reader :meta_token
78
+
79
+ sig { params(meta_token: String).void }
80
+ attr_writer :meta_token
81
+
82
+ # PostgreSQL connection URL for the filesystem's metadata database. In create and
83
+ # rotate-meta-token responses it embeds the metadata token as the password:
84
+ # `postgres://<database>:<meta_token>@us-east-1.telnyxcloudfs.com:5432/<database>?sslmode=require`
85
+ # (the example below is shown without the credential; the actual response includes
86
+ # it). Pass it to `juicefs mount`: the storage configuration is baked in at
87
+ # provisioning, so the metadata URL is all a client needs to mount the filesystem.
88
+ sig { returns(T.nilable(String)) }
89
+ attr_reader :meta_url
90
+
91
+ sig { params(meta_url: String).void }
92
+ attr_writer :meta_url
93
+
94
+ sig { returns(T.nilable(String)) }
95
+ attr_reader :name
96
+
97
+ sig { params(name: String).void }
98
+ attr_writer :name
99
+
100
+ sig { returns(T.nilable(String)) }
101
+ attr_reader :record_type
102
+
103
+ sig { params(record_type: String).void }
104
+ attr_writer :record_type
105
+
106
+ sig { returns(T.nilable(String)) }
107
+ attr_reader :region
108
+
109
+ sig { params(region: String).void }
110
+ attr_writer :region
111
+
112
+ # Name of the bucket that stores this filesystem's data. Created during
113
+ # provisioning.
114
+ sig { returns(T.nilable(String)) }
115
+ attr_reader :s3_bucket
116
+
117
+ sig { params(s3_bucket: String).void }
118
+ attr_writer :s3_bucket
119
+
120
+ # URL of the Telnyx Cloud Storage endpoint backing this filesystem.
121
+ sig { returns(T.nilable(String)) }
122
+ attr_reader :s3_endpoint
123
+
124
+ sig { params(s3_endpoint: String).void }
125
+ attr_writer :s3_endpoint
126
+
127
+ # Lifecycle status of the filesystem. `ready` means it is fully provisioned and
128
+ # usable. `needs_format` means the storage bucket and metadata database were
129
+ # provisioned but the filesystem has not yet been formatted — run `juicefs format`
130
+ # with the filesystem's `meta_url` before mounting. `failed` means the last
131
+ # lifecycle action failed — see the filesystem's `error` message. `deleted`
132
+ # appears only in the delete response: deleted filesystems are excluded from list
133
+ # results and return a `404` on retrieval.
134
+ sig do
135
+ returns(
136
+ T.nilable(Telnyx::Storage::CloudfsFilesystemStatus::TaggedSymbol)
137
+ )
138
+ end
139
+ attr_reader :status
140
+
141
+ sig do
142
+ params(
143
+ status: Telnyx::Storage::CloudfsFilesystemStatus::OrSymbol
144
+ ).void
145
+ end
146
+ attr_writer :status
147
+
148
+ sig { returns(T.nilable(Time)) }
149
+ attr_reader :updated_at
150
+
151
+ sig { params(updated_at: Time).void }
152
+ attr_writer :updated_at
153
+
154
+ # A CloudFS filesystem, including its metadata credential. This shape is returned
155
+ # only by create and rotate-meta-token.
156
+ sig do
157
+ params(
158
+ id: String,
159
+ created_at: Time,
160
+ meta_token: String,
161
+ meta_url: String,
162
+ name: String,
163
+ record_type: String,
164
+ region: String,
165
+ s3_bucket: String,
166
+ s3_endpoint: String,
167
+ status: Telnyx::Storage::CloudfsFilesystemStatus::OrSymbol,
168
+ updated_at: Time
169
+ ).returns(T.attached_class)
170
+ end
171
+ def self.new(
172
+ id: nil,
173
+ created_at: nil,
174
+ # Metadata access token, in cleartext. Returned only by create and
175
+ # rotate-meta-token and not retrievable afterwards — store it securely.
176
+ meta_token: nil,
177
+ # PostgreSQL connection URL for the filesystem's metadata database. In create and
178
+ # rotate-meta-token responses it embeds the metadata token as the password:
179
+ # `postgres://<database>:<meta_token>@us-east-1.telnyxcloudfs.com:5432/<database>?sslmode=require`
180
+ # (the example below is shown without the credential; the actual response includes
181
+ # it). Pass it to `juicefs mount`: the storage configuration is baked in at
182
+ # provisioning, so the metadata URL is all a client needs to mount the filesystem.
183
+ meta_url: nil,
184
+ name: nil,
185
+ record_type: nil,
186
+ region: nil,
187
+ # Name of the bucket that stores this filesystem's data. Created during
188
+ # provisioning.
189
+ s3_bucket: nil,
190
+ # URL of the Telnyx Cloud Storage endpoint backing this filesystem.
191
+ s3_endpoint: nil,
192
+ # Lifecycle status of the filesystem. `ready` means it is fully provisioned and
193
+ # usable. `needs_format` means the storage bucket and metadata database were
194
+ # provisioned but the filesystem has not yet been formatted — run `juicefs format`
195
+ # with the filesystem's `meta_url` before mounting. `failed` means the last
196
+ # lifecycle action failed — see the filesystem's `error` message. `deleted`
197
+ # appears only in the delete response: deleted filesystems are excluded from list
198
+ # results and return a `404` on retrieval.
199
+ status: nil,
200
+ updated_at: nil
201
+ )
202
+ end
203
+
204
+ sig do
205
+ override.returns(
206
+ {
207
+ id: String,
208
+ created_at: Time,
209
+ meta_token: String,
210
+ meta_url: String,
211
+ name: String,
212
+ record_type: String,
213
+ region: String,
214
+ s3_bucket: String,
215
+ s3_endpoint: String,
216
+ status: Telnyx::Storage::CloudfsFilesystemStatus::TaggedSymbol,
217
+ updated_at: Time
218
+ }
219
+ )
220
+ end
221
+ def to_hash
222
+ end
223
+ end
224
+ end
225
+ end
226
+ end
227
+ end
@@ -0,0 +1,57 @@
1
+ # typed: strong
2
+
3
+ module Telnyx
4
+ module Models
5
+ module Storage
6
+ # Lifecycle status of the filesystem. `ready` means it is fully provisioned and
7
+ # usable. `needs_format` means the storage bucket and metadata database were
8
+ # provisioned but the filesystem has not yet been formatted — run `juicefs format`
9
+ # with the filesystem's `meta_url` before mounting. `failed` means the last
10
+ # lifecycle action failed — see the filesystem's `error` message. `deleted`
11
+ # appears only in the delete response: deleted filesystems are excluded from list
12
+ # results and return a `404` on retrieval.
13
+ module CloudfsFilesystemStatus
14
+ extend Telnyx::Internal::Type::Enum
15
+
16
+ TaggedSymbol =
17
+ T.type_alias do
18
+ T.all(Symbol, Telnyx::Storage::CloudfsFilesystemStatus)
19
+ end
20
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
21
+
22
+ PROVISIONING =
23
+ T.let(
24
+ :provisioning,
25
+ Telnyx::Storage::CloudfsFilesystemStatus::TaggedSymbol
26
+ )
27
+ READY =
28
+ T.let(:ready, Telnyx::Storage::CloudfsFilesystemStatus::TaggedSymbol)
29
+ NEEDS_FORMAT =
30
+ T.let(
31
+ :needs_format,
32
+ Telnyx::Storage::CloudfsFilesystemStatus::TaggedSymbol
33
+ )
34
+ DELETING =
35
+ T.let(
36
+ :deleting,
37
+ Telnyx::Storage::CloudfsFilesystemStatus::TaggedSymbol
38
+ )
39
+ FAILED =
40
+ T.let(:failed, Telnyx::Storage::CloudfsFilesystemStatus::TaggedSymbol)
41
+ DELETED =
42
+ T.let(
43
+ :deleted,
44
+ Telnyx::Storage::CloudfsFilesystemStatus::TaggedSymbol
45
+ )
46
+
47
+ sig do
48
+ override.returns(
49
+ T::Array[Telnyx::Storage::CloudfsFilesystemStatus::TaggedSymbol]
50
+ )
51
+ end
52
+ def self.values
53
+ end
54
+ end
55
+ end
56
+ end
57
+ end
@@ -475,7 +475,7 @@ module Telnyx
475
475
  sig { returns(T.nilable(String)) }
476
476
  attr_accessor :sender_phone_number
477
477
 
478
- # Customer pre-approved authentication template name registered on Meta
478
+ # Customer pre-approved authentication template ID registered on Meta
479
479
  sig { returns(T.nilable(String)) }
480
480
  attr_accessor :template_id
481
481
 
@@ -521,7 +521,7 @@ module Telnyx
521
521
  messaging_template_id: nil,
522
522
  # Phone number registered on the customer WABA to send OTPs from
523
523
  sender_phone_number: nil,
524
- # Customer pre-approved authentication template name registered on Meta
524
+ # Customer pre-approved authentication template ID registered on Meta
525
525
  template_id: nil,
526
526
  # Customer Meta WABA ID for Bring-Your-Own-WABA sending
527
527
  waba_id: nil,
@@ -435,7 +435,7 @@ module Telnyx
435
435
  sig { returns(T.nilable(String)) }
436
436
  attr_accessor :sender_phone_number
437
437
 
438
- # Customer pre-approved authentication template name registered on Meta
438
+ # Customer pre-approved authentication template ID registered on Meta
439
439
  sig { returns(T.nilable(String)) }
440
440
  attr_accessor :template_id
441
441
 
@@ -471,7 +471,7 @@ module Telnyx
471
471
  default_verification_timeout_secs: nil,
472
472
  # Phone number registered on the customer WABA to send OTPs from
473
473
  sender_phone_number: nil,
474
- # Customer pre-approved authentication template name registered on Meta
474
+ # Customer pre-approved authentication template ID registered on Meta
475
475
  template_id: nil,
476
476
  # Customer Meta WABA ID for Bring-Your-Own-WABA sending
477
477
  waba_id: nil,
@@ -355,7 +355,7 @@ module Telnyx
355
355
  sig { returns(T.nilable(String)) }
356
356
  attr_accessor :sender_phone_number
357
357
 
358
- # Customer pre-approved authentication template name registered on Meta
358
+ # Customer pre-approved authentication template ID registered on Meta
359
359
  sig { returns(T.nilable(String)) }
360
360
  attr_accessor :template_id
361
361
 
@@ -391,7 +391,7 @@ module Telnyx
391
391
  default_verification_timeout_secs: nil,
392
392
  # Phone number registered on the customer WABA to send OTPs from
393
393
  sender_phone_number: nil,
394
- # Customer pre-approved authentication template name registered on Meta
394
+ # Customer pre-approved authentication template ID registered on Meta
395
395
  template_id: nil,
396
396
  # Customer Meta WABA ID for Bring-Your-Own-WABA sending
397
397
  waba_id: nil,
@@ -0,0 +1,106 @@
1
+ # typed: strong
2
+
3
+ module Telnyx
4
+ module Resources
5
+ class AI
6
+ class Anthropic
7
+ class V1
8
+ # Send a message to a language model using the Anthropic Messages API format. This
9
+ # endpoint is compatible with the
10
+ # [Anthropic Messages API](https://docs.anthropic.com/en/api/messages) and may be
11
+ # used with the Anthropic JS or Python SDK by setting the base URL to
12
+ # `https://api.telnyx.com/v2/ai/anthropic`.
13
+ #
14
+ # The endpoint translates Anthropic-format requests into Telnyx's inference
15
+ # internals, then translates the response back to the Anthropic message shape.
16
+ # Streaming responses use Anthropic SSE event types (`message_start`,
17
+ # `content_block_start`, `content_block_delta`, `content_block_stop`,
18
+ # `message_delta`, `message_stop`).
19
+ sig do
20
+ params(
21
+ max_tokens: Integer,
22
+ messages: T::Array[T::Hash[Symbol, T.anything]],
23
+ model: String,
24
+ api_key_ref: String,
25
+ billing_group_id: String,
26
+ fallback_config: T::Hash[Symbol, T.anything],
27
+ max_retries: Integer,
28
+ mcp_servers: T::Array[T::Hash[Symbol, T.anything]],
29
+ metadata: T::Hash[Symbol, T.anything],
30
+ service_tier: String,
31
+ stop_sequences: T::Array[String],
32
+ stream: T::Boolean,
33
+ system_:
34
+ Telnyx::AI::Anthropic::V1MessagesParams::System::Variants,
35
+ temperature: Float,
36
+ thinking: T::Hash[Symbol, T.anything],
37
+ timeout: Float,
38
+ tool_choice: T::Hash[Symbol, T.anything],
39
+ tools: T::Array[T::Hash[Symbol, T.anything]],
40
+ top_k: Integer,
41
+ top_p: Float,
42
+ request_options: Telnyx::RequestOptions::OrHash
43
+ ).returns(T::Hash[Symbol, T.anything])
44
+ end
45
+ def messages(
46
+ # The maximum number of tokens to generate in the response.
47
+ max_tokens:,
48
+ # The messages to send to the model, following the
49
+ # [Anthropic Messages API](https://docs.anthropic.com/en/api/messages) format.
50
+ messages:,
51
+ # The model to use for generating the response, for example `zai-org/GLM-5.2` or
52
+ # another model available from the Telnyx models endpoint.
53
+ model:,
54
+ # If you are using an external inference provider, this field allows you to pass
55
+ # along a reference to your API key. After creating an
56
+ # [integration secret](https://developers.telnyx.com/api-reference/integration-secrets/create-a-secret)
57
+ # for your API key, pass the secret's `identifier` in this field.
58
+ api_key_ref: nil,
59
+ # The billing group ID to associate with this request.
60
+ billing_group_id: nil,
61
+ # Configuration for model fallback behavior when the primary model is unavailable.
62
+ fallback_config: nil,
63
+ # Maximum number of retries for the request.
64
+ max_retries: nil,
65
+ # List of MCP (Model Context Protocol) servers to make available to the model.
66
+ mcp_servers: nil,
67
+ # An object describing metadata about the request.
68
+ metadata: nil,
69
+ # Service tier for the request.
70
+ service_tier: nil,
71
+ # Custom sequences that will cause the model to stop generating.
72
+ stop_sequences: nil,
73
+ # Whether to stream the response as Anthropic-format Server-Sent Events.
74
+ stream: nil,
75
+ # System prompt. Can be a string or an array of content blocks following the
76
+ # Anthropic API format.
77
+ system_: nil,
78
+ # Amount of randomness injected into the response. Ranges from 0 to 1.
79
+ temperature: nil,
80
+ # Extended thinking configuration for models that support it. Set `type` to
81
+ # `enabled` to turn on extended thinking.
82
+ thinking: nil,
83
+ # Request timeout in seconds.
84
+ timeout: nil,
85
+ # Controls how the model uses tools, following the Anthropic API format.
86
+ tool_choice: nil,
87
+ # Definitions of tools that the model may use, following the Anthropic API format.
88
+ tools: nil,
89
+ # Top-k sampling parameter. Only sample from the top K options for each subsequent
90
+ # token.
91
+ top_k: nil,
92
+ # Nucleus sampling parameter. Use temperature or top_p, but not both.
93
+ top_p: nil,
94
+ request_options: {}
95
+ )
96
+ end
97
+
98
+ # @api private
99
+ sig { params(client: Telnyx::Client).returns(T.attached_class) }
100
+ def self.new(client:)
101
+ end
102
+ end
103
+ end
104
+ end
105
+ end
106
+ end
@@ -0,0 +1,17 @@
1
+ # typed: strong
2
+
3
+ module Telnyx
4
+ module Resources
5
+ class AI
6
+ class Anthropic
7
+ sig { returns(Telnyx::Resources::AI::Anthropic::V1) }
8
+ attr_reader :v1
9
+
10
+ # @api private
11
+ sig { params(client: Telnyx::Client).returns(T.attached_class) }
12
+ def self.new(client:)
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -71,7 +71,8 @@ module Telnyx
71
71
  Telnyx::AI::AssistantTool::Refer::OrHash,
72
72
  Telnyx::AI::AssistantTool::SendDtmf::OrHash,
73
73
  Telnyx::AI::AssistantTool::SendMessage::OrHash,
74
- Telnyx::AI::AssistantTool::SkipTurn::OrHash
74
+ Telnyx::AI::AssistantTool::SkipTurn::OrHash,
75
+ Telnyx::AI::AssistantTool::Pay::OrHash
75
76
  )
76
77
  ],
77
78
  transcription: Telnyx::AI::TranscriptionSettings::OrHash,
@@ -75,7 +75,8 @@ module Telnyx
75
75
  Telnyx::AI::AssistantTool::Refer::OrHash,
76
76
  Telnyx::AI::AssistantTool::SendDtmf::OrHash,
77
77
  Telnyx::AI::AssistantTool::SendMessage::OrHash,
78
- Telnyx::AI::AssistantTool::SkipTurn::OrHash
78
+ Telnyx::AI::AssistantTool::SkipTurn::OrHash,
79
+ Telnyx::AI::AssistantTool::Pay::OrHash
79
80
  )
80
81
  ],
81
82
  transcription: Telnyx::AI::TranscriptionSettings::OrHash,
@@ -250,7 +251,8 @@ module Telnyx
250
251
  Telnyx::AI::AssistantTool::Refer::OrHash,
251
252
  Telnyx::AI::AssistantTool::SendDtmf::OrHash,
252
253
  Telnyx::AI::AssistantTool::SendMessage::OrHash,
253
- Telnyx::AI::AssistantTool::SkipTurn::OrHash
254
+ Telnyx::AI::AssistantTool::SkipTurn::OrHash,
255
+ Telnyx::AI::AssistantTool::Pay::OrHash
254
256
  )
255
257
  ],
256
258
  transcription: Telnyx::AI::TranscriptionSettings::OrHash,
@@ -0,0 +1,68 @@
1
+ # typed: strong
2
+
3
+ module Telnyx
4
+ module Resources
5
+ class AI
6
+ class Conversations
7
+ # Manage historical AI assistant conversations
8
+ class ConversationInsights
9
+ # Aggregate conversation insights by specified fields
10
+ sig do
11
+ params(
12
+ created_at: String,
13
+ group_by: T::Array[String],
14
+ insight_id: String,
15
+ metadata:
16
+ Telnyx::AI::Conversations::ConversationInsightRetrieveAggregatesParams::Metadata::OrHash,
17
+ show: T::Array[String],
18
+ request_options: Telnyx::RequestOptions::OrHash
19
+ ).returns(
20
+ Telnyx::Models::AI::Conversations::ConversationInsightRetrieveAggregatesResponse
21
+ )
22
+ end
23
+ def retrieve_aggregates(
24
+ # Filter by creation datetime to scope the aggregation window. Supports range
25
+ # operators (e.g., `created_at=gte.2025-01-01T00:00:00Z` for the start of the
26
+ # range, `created_at=lt.2025-01-02T00:00:00Z` for the end). To build per-day time
27
+ # series (as the portal does for the 'Insights Over Time' chart), issue one
28
+ # request per day bounded by `created_at=gte.<day_start>` and
29
+ # `created_at=lt.<next_day_start>`.
30
+ created_at: nil,
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
+ group_by: nil,
47
+ # Optional insight ID to filter conversation insights. Only insights matching this
48
+ # ID will be included in the aggregation.
49
+ insight_id: nil,
50
+ metadata: nil,
51
+ # Fields to include in the result (can be comma-separated or multiple parameters).
52
+ # Supports the same 'metadata.<key>' prefix as group_by. Each returned row will
53
+ # contain the grouped field values plus a `record_count` indicating how many
54
+ # conversation insights match that combination.
55
+ show: nil,
56
+ request_options: {}
57
+ )
58
+ end
59
+
60
+ # @api private
61
+ sig { params(client: Telnyx::Client).returns(T.attached_class) }
62
+ def self.new(client:)
63
+ end
64
+ end
65
+ end
66
+ end
67
+ end
68
+ end
@@ -17,6 +17,12 @@ module Telnyx
17
17
  sig { returns(Telnyx::Resources::AI::Conversations::Messages) }
18
18
  attr_reader :messages
19
19
 
20
+ # Manage historical AI assistant conversations
21
+ sig do
22
+ returns(Telnyx::Resources::AI::Conversations::ConversationInsights)
23
+ end
24
+ attr_reader :conversation_insights
25
+
20
26
  # Create a new AI Conversation.
21
27
  sig do
22
28
  params(
@@ -14,6 +14,7 @@ module Telnyx
14
14
  function: T::Hash[Symbol, T.anything],
15
15
  handoff: T::Hash[Symbol, T.anything],
16
16
  invite: T::Hash[Symbol, T.anything],
17
+ pay: Telnyx::AI::PayToolParams::OrHash,
17
18
  retrieval: T::Hash[Symbol, T.anything],
18
19
  timeout_ms: Integer,
19
20
  webhook: T::Hash[Symbol, T.anything],
@@ -27,6 +28,7 @@ module Telnyx
27
28
  function: nil,
28
29
  handoff: nil,
29
30
  invite: nil,
31
+ pay: nil,
30
32
  retrieval: nil,
31
33
  timeout_ms: nil,
32
34
  webhook: nil,
@@ -57,6 +59,7 @@ module Telnyx
57
59
  function: T::Hash[Symbol, T.anything],
58
60
  handoff: T::Hash[Symbol, T.anything],
59
61
  invite: T::Hash[Symbol, T.anything],
62
+ pay: Telnyx::AI::PayToolParams::OrHash,
60
63
  retrieval: T::Hash[Symbol, T.anything],
61
64
  timeout_ms: Integer,
62
65
  type: String,
@@ -72,6 +75,7 @@ module Telnyx
72
75
  function: nil,
73
76
  handoff: nil,
74
77
  invite: nil,
78
+ pay: nil,
75
79
  retrieval: nil,
76
80
  timeout_ms: nil,
77
81
  type: nil,
@@ -44,6 +44,9 @@ module Telnyx
44
44
  sig { returns(Telnyx::Resources::AI::Tools) }
45
45
  attr_reader :tools
46
46
 
47
+ sig { returns(Telnyx::Resources::AI::Anthropic) }
48
+ attr_reader :anthropic
49
+
47
50
  # Performs semantic vector search across conversation history records.
48
51
  #
49
52
  # **How it works:**
@@ -70,6 +70,7 @@ module Telnyx
70
70
  record_timeout_secs: Integer,
71
71
  record_track: Telnyx::CallDialParams::RecordTrack::OrSymbol,
72
72
  record_trim: Telnyx::CallDialParams::RecordTrim::OrSymbol,
73
+ retry_on_timeout: T::Boolean,
73
74
  send_digits_on_answer: String,
74
75
  send_silence_when_idle: T::Boolean,
75
76
  sip_auth_password: String,
@@ -257,6 +258,12 @@ module Telnyx
257
258
  # When set to `trim-silence`, silence will be removed from the beginning and end
258
259
  # of the recording.
259
260
  record_trim: nil,
261
+ # Whether to keep trying the remaining routing paths (e.g. alternate
262
+ # providers/gateways) for the same destination after `timeout_secs` is reached for
263
+ # the current attempt. When set to `false`, reaching `timeout_secs` aborts the
264
+ # entire dial attempt and the `call.hangup` webhook reports a `hangup_cause` of
265
+ # `no_answer` instead of `timeout`.
266
+ retry_on_timeout: nil,
260
267
  # DTMF digits to send automatically after the called party answers. Useful for
261
268
  # reaching an extension behind an IVR (e.g. `"200"` to dial extension 200 once the
262
269
  # called party picks up). Allowed characters: `0-9`, `A-D`, `w` (0.5s pause), `W`
@@ -100,7 +100,7 @@ module Telnyx
100
100
  def list(
101
101
  # Consolidated filter parameter (deepObject style). Originally:
102
102
  # filter[email][contains], filter[email][eq], filter[organization_name][contains],
103
- # filter[organization_name][eq]
103
+ # filter[organization_name][eq], filter[status][eq]
104
104
  filter: nil,
105
105
  # Specifies if cancelled accounts should be included in the results.
106
106
  include_cancelled_accounts: nil,