telnyx 5.167.0 → 5.169.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 (396) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/README.md +1 -1
  4. data/lib/telnyx/client.rb +44 -0
  5. data/lib/telnyx/internal/type/union.rb +6 -6
  6. data/lib/telnyx/models/ai/assistant_a2_a_agent.rb +195 -0
  7. data/lib/telnyx/models/ai/assistant_create_params.rb +22 -7
  8. data/lib/telnyx/models/ai/assistant_tool.rb +285 -12
  9. data/lib/telnyx/models/ai/assistant_update_params.rb +37 -10
  10. data/lib/telnyx/models/ai/assistants/update_assistant.rb +37 -10
  11. data/lib/telnyx/models/ai/audio_transcribe_params.rb +33 -13
  12. data/lib/telnyx/models/ai/audio_transcribe_response.rb +34 -56
  13. data/lib/telnyx/models/ai/audio_transcription_response_word.rb +74 -0
  14. data/lib/telnyx/models/ai/chat_completion_request.rb +128 -74
  15. data/lib/telnyx/models/ai/flow_node.rb +2 -2
  16. data/lib/telnyx/models/ai/inference_embedding.rb +29 -11
  17. data/lib/telnyx/models/ai/inference_embedding_interruption_settings.rb +10 -1
  18. data/lib/telnyx/models/ai/inference_embedding_webhook_tool_params.rb +21 -1
  19. data/lib/telnyx/models/ai/openai/function_definition.rb +31 -0
  20. data/lib/telnyx/models/ai/post_conversation_settings.rb +4 -4
  21. data/lib/telnyx/models/ai/post_conversation_settings_req.rb +4 -4
  22. data/lib/telnyx/models/ai/privacy_settings.rb +20 -1
  23. data/lib/telnyx/models/ai/retrieval_tool.rb +21 -1
  24. data/lib/telnyx/models/ai/telephony_settings.rb +101 -17
  25. data/lib/telnyx/models/ai/tool_node.rb +2 -2
  26. data/lib/telnyx/models/ai/transcription_settings.rb +12 -4
  27. data/lib/telnyx/models/ai/transcription_settings_config.rb +12 -11
  28. data/lib/telnyx/models/ai/typesafe/v1_systemone_params.rb +268 -0
  29. data/lib/telnyx/models/ai/typesafe/v1_systemone_response.rb +222 -0
  30. data/lib/telnyx/models/bot_challenge_create_params.rb +38 -0
  31. data/lib/telnyx/models/bot_challenge_create_response.rb +87 -0
  32. data/lib/telnyx/models/bot_session_list_params.rb +34 -0
  33. data/lib/telnyx/models/bot_session_list_response.rb +32 -0
  34. data/lib/telnyx/models/bot_signup_create_params.rb +103 -0
  35. data/lib/telnyx/models/bot_signup_resend_magic_link_params.rb +22 -0
  36. data/lib/telnyx/models/call_dial_params.rb +75 -7
  37. data/lib/telnyx/models/calls/action_transfer_params.rb +75 -7
  38. data/lib/telnyx/models/calls/transcription_config.rb +14 -3
  39. data/lib/telnyx/models/calls/transcription_engine_assemblyai_config.rb +6 -3
  40. data/lib/telnyx/models/calls/transcription_engine_parakeet_config.rb +1 -0
  41. data/lib/telnyx/models/compute/func_retrieve_logs_params.rb +66 -0
  42. data/lib/telnyx/models/compute/func_retrieve_logs_response.rb +161 -0
  43. data/lib/telnyx/models/compute/func_retrieve_metric_aggregates_params.rb +69 -0
  44. data/lib/telnyx/models/compute/func_retrieve_metric_aggregates_response.rb +137 -0
  45. data/lib/telnyx/models/compute/func_retrieve_revisions_params.rb +34 -0
  46. data/lib/telnyx/models/compute/func_retrieve_revisions_response.rb +101 -0
  47. data/lib/telnyx/models/compute/func_retrieve_ship_inspection_params.rb +22 -0
  48. data/lib/telnyx/models/compute/func_retrieve_ship_inspection_response.rb +94 -0
  49. data/lib/telnyx/models/compute/funcs/export_create_params.rb +62 -0
  50. data/lib/telnyx/models/compute/funcs/export_delete_all_params.rb +24 -0
  51. data/lib/telnyx/models/compute/funcs/export_list_params.rb +24 -0
  52. data/lib/telnyx/models/compute/funcs/func_log_export_config_response.rb +113 -0
  53. data/lib/telnyx/models/compute/functions_observability_pagination_meta.rb +35 -0
  54. data/lib/telnyx/models/compute/logs_meta.rb +23 -0
  55. data/lib/telnyx/models/connection_retrieve_count_params.rb +14 -0
  56. data/lib/telnyx/models/connection_retrieve_count_response.rb +215 -0
  57. data/lib/telnyx/models/credential_connection.rb +4 -1
  58. data/lib/telnyx/models/detail_record_list_params.rb +19 -2
  59. data/lib/telnyx/models/email_inboxes/email_message.rb +12 -1
  60. data/lib/telnyx/models/email_message_batch_params.rb +4 -1
  61. data/lib/telnyx/models/email_message_batch_response.rb +1 -0
  62. data/lib/telnyx/models/fqdn_connection.rb +5 -2
  63. data/lib/telnyx/models/fqdn_connections/fqdn_authentication.rb +9 -2
  64. data/lib/telnyx/models/inbound_message_webhook_event.rb +3 -70
  65. data/lib/telnyx/models/machine_payment_account_credit_params.rb +29 -0
  66. data/lib/telnyx/models/machine_payment_account_credit_response.rb +223 -0
  67. data/lib/telnyx/models/message_retrieve_group_messages_response.rb +3 -3
  68. data/lib/telnyx/models/message_retrieve_response.rb +4 -4
  69. data/lib/telnyx/models/message_schedule_response.rb +3 -3
  70. data/lib/telnyx/models/message_send_group_mms_response.rb +3 -3
  71. data/lib/telnyx/models/message_send_long_code_response.rb +3 -3
  72. data/lib/telnyx/models/message_send_number_pool_response.rb +3 -3
  73. data/lib/telnyx/models/message_send_response.rb +3 -3
  74. data/lib/telnyx/models/message_send_short_code_response.rb +3 -3
  75. data/lib/telnyx/models/messaging_inbound_message.rb +71 -0
  76. data/lib/telnyx/models/messaging_inbound_message_payload.rb +412 -66
  77. data/lib/telnyx/models/messaging_messaging_profile.rb +11 -1
  78. data/lib/telnyx/models/messaging_outbound_message_payload.rb +42 -2
  79. data/lib/telnyx/models/messaging_profile_create_params.rb +11 -1
  80. data/lib/telnyx/models/messaging_profile_features.rb +26 -0
  81. data/lib/telnyx/models/messaging_profile_update_params.rb +11 -1
  82. data/lib/telnyx/models/noise_suppression_engine_list_params.rb +14 -0
  83. data/lib/telnyx/models/noise_suppression_engine_list_response.rb +50 -0
  84. data/lib/telnyx/models/number_order_status_update.rb +15 -3
  85. data/lib/telnyx/models/number_order_status_update_webhook_event.rb +15 -3
  86. data/lib/telnyx/models/outbound_message.rb +1 -0
  87. data/lib/telnyx/models/outbound_message_payload.rb +45 -5
  88. data/lib/telnyx/models/speech_to_text_retrieve_transcription_params.rb +1 -0
  89. data/lib/telnyx/models/success_response.rb +27 -0
  90. data/lib/telnyx/models/texml/accounts/call_calls_params.rb +246 -3
  91. data/lib/telnyx/models/texml/accounts/conferences/participant_participants_params.rb +82 -1
  92. data/lib/telnyx/models/texml/call_create_params.rb +78 -0
  93. data/lib/telnyx/models/texml/call_create_response.rb +55 -0
  94. data/lib/telnyx/models/texml_initiate_ai_call_params.rb +76 -1
  95. data/lib/telnyx/models/uac_connection.rb +4 -1
  96. data/lib/telnyx/models/uac_external_settings.rb +6 -2
  97. data/lib/telnyx/models/unsafe_unwrap_webhook_event.rb +5 -1
  98. data/lib/telnyx/models/unwrap_webhook_event.rb +5 -1
  99. data/lib/telnyx/models/voice_clone_create_from_upload_params.rb +2 -2
  100. data/lib/telnyx/models/whatsapp/business_accounts/phone_number_list_response.rb +104 -1
  101. data/lib/telnyx/models/whatsapp/phone_number_get_response.rb +103 -1
  102. data/lib/telnyx/models/whatsapp/phone_number_list_response.rb +103 -1
  103. data/lib/telnyx/models/whatsapp/phone_number_retrieve_phone_number_params.rb +22 -0
  104. data/lib/telnyx/models/whatsapp/phone_number_retrieve_phone_number_response.rb +207 -0
  105. data/lib/telnyx/models/whatsapp_account_update.rb +112 -0
  106. data/lib/telnyx/models/whatsapp_message_echo.rb +340 -0
  107. data/lib/telnyx/models/x402/credit_account/payment_list_params.rb +34 -0
  108. data/lib/telnyx/models/x402/credit_account/payment_retrieve_params.rb +24 -0
  109. data/lib/telnyx/models/x402/credit_account/payment_retrieve_response.rb +21 -0
  110. data/lib/telnyx/models/x402/credit_account/x402_transaction_record.rb +113 -0
  111. data/lib/telnyx/models.rb +26 -0
  112. data/lib/telnyx/resources/ai/assistants/versions.rb +4 -2
  113. data/lib/telnyx/resources/ai/assistants.rb +8 -4
  114. data/lib/telnyx/resources/ai/audio.rb +2 -2
  115. data/lib/telnyx/resources/ai/openai/chat.rb +2 -8
  116. data/lib/telnyx/resources/ai/typesafe/v1.rb +62 -0
  117. data/lib/telnyx/resources/ai/typesafe.rb +22 -0
  118. data/lib/telnyx/resources/ai.rb +4 -0
  119. data/lib/telnyx/resources/bot_challenge.rb +53 -0
  120. data/lib/telnyx/resources/bot_sessions.rb +57 -0
  121. data/lib/telnyx/resources/bot_signup.rb +97 -0
  122. data/lib/telnyx/resources/calls/actions.rb +1 -1
  123. data/lib/telnyx/resources/calls.rb +1 -1
  124. data/lib/telnyx/resources/compute/funcs/export.rb +105 -0
  125. data/lib/telnyx/resources/compute/funcs.rb +145 -0
  126. data/lib/telnyx/resources/compute.rb +18 -0
  127. data/lib/telnyx/resources/connections.rb +20 -0
  128. data/lib/telnyx/resources/detail_records.rb +1 -1
  129. data/lib/telnyx/resources/email_messages.rb +6 -2
  130. data/lib/telnyx/resources/machine_payments.rb +73 -0
  131. data/lib/telnyx/resources/messaging_profiles.rb +6 -2
  132. data/lib/telnyx/resources/noise_suppression_engines.rb +37 -0
  133. data/lib/telnyx/resources/texml/accounts/conferences/participants.rb +15 -1
  134. data/lib/telnyx/resources/texml/calls.rb +57 -0
  135. data/lib/telnyx/resources/texml.rb +20 -1
  136. data/lib/telnyx/resources/voice_clones.rb +4 -2
  137. data/lib/telnyx/resources/webhooks.rb +2 -2
  138. data/lib/telnyx/resources/whatsapp/phone_numbers.rb +22 -0
  139. data/lib/telnyx/resources/x402/credit_account/payments.rb +71 -0
  140. data/lib/telnyx/resources/x402/credit_account.rb +8 -2
  141. data/lib/telnyx/version.rb +1 -1
  142. data/lib/telnyx.rb +56 -0
  143. data/rbi/telnyx/client.rbi +38 -0
  144. data/rbi/telnyx/models/ai/assistant_a2_a_agent.rbi +345 -0
  145. data/rbi/telnyx/models/ai/assistant_create_params.rbi +45 -12
  146. data/rbi/telnyx/models/ai/assistant_tool.rbi +423 -20
  147. data/rbi/telnyx/models/ai/assistant_update_params.rbi +73 -16
  148. data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +73 -16
  149. data/rbi/telnyx/models/ai/audio_transcribe_params.rbi +71 -20
  150. data/rbi/telnyx/models/ai/audio_transcribe_response.rbi +63 -97
  151. data/rbi/telnyx/models/ai/audio_transcription_response_word.rbi +108 -0
  152. data/rbi/telnyx/models/ai/chat_completion_request.rbi +228 -150
  153. data/rbi/telnyx/models/ai/flow_node.rbi +4 -2
  154. data/rbi/telnyx/models/ai/inference_embedding.rbi +53 -16
  155. data/rbi/telnyx/models/ai/inference_embedding_interruption_settings.rbi +10 -0
  156. data/rbi/telnyx/models/ai/inference_embedding_webhook_tool_params.rbi +29 -3
  157. data/rbi/telnyx/models/ai/openai/function_definition.rbi +56 -0
  158. data/rbi/telnyx/models/ai/post_conversation_settings.rbi +4 -4
  159. data/rbi/telnyx/models/ai/post_conversation_settings_req.rbi +4 -4
  160. data/rbi/telnyx/models/ai/privacy_settings.rbi +43 -3
  161. data/rbi/telnyx/models/ai/retrieval_tool.rbi +29 -3
  162. data/rbi/telnyx/models/ai/telephony_settings.rbi +197 -20
  163. data/rbi/telnyx/models/ai/tool_node.rbi +4 -2
  164. data/rbi/telnyx/models/ai/transcription_settings.rbi +25 -6
  165. data/rbi/telnyx/models/ai/transcription_settings_config.rbi +18 -16
  166. data/rbi/telnyx/models/ai/typesafe/v1_systemone_params.rbi +504 -0
  167. data/rbi/telnyx/models/ai/typesafe/v1_systemone_response.rbi +348 -0
  168. data/rbi/telnyx/models/bot_challenge_create_params.rbi +68 -0
  169. data/rbi/telnyx/models/bot_challenge_create_response.rbi +169 -0
  170. data/rbi/telnyx/models/bot_session_list_params.rbi +53 -0
  171. data/rbi/telnyx/models/bot_session_list_response.rbi +64 -0
  172. data/rbi/telnyx/models/bot_signup_create_params.rbi +179 -0
  173. data/rbi/telnyx/models/bot_signup_resend_magic_link_params.rbi +43 -0
  174. data/rbi/telnyx/models/call_dial_params.rbi +111 -10
  175. data/rbi/telnyx/models/calls/action_transfer_params.rbi +111 -10
  176. data/rbi/telnyx/models/calls/transcription_config.rbi +29 -5
  177. data/rbi/telnyx/models/calls/transcription_engine_assemblyai_config.rbi +11 -3
  178. data/rbi/telnyx/models/calls/transcription_engine_parakeet_config.rbi +5 -0
  179. data/rbi/telnyx/models/compute/func_retrieve_logs_params.rbi +130 -0
  180. data/rbi/telnyx/models/compute/func_retrieve_logs_response.rbi +410 -0
  181. data/rbi/telnyx/models/compute/func_retrieve_metric_aggregates_params.rbi +102 -0
  182. data/rbi/telnyx/models/compute/func_retrieve_metric_aggregates_response.rbi +231 -0
  183. data/rbi/telnyx/models/compute/func_retrieve_revisions_params.rbi +59 -0
  184. data/rbi/telnyx/models/compute/func_retrieve_revisions_response.rbi +213 -0
  185. data/rbi/telnyx/models/compute/func_retrieve_ship_inspection_params.rbi +40 -0
  186. data/rbi/telnyx/models/compute/func_retrieve_ship_inspection_response.rbi +252 -0
  187. data/rbi/telnyx/models/compute/funcs/export_create_params.rbi +84 -0
  188. data/rbi/telnyx/models/compute/funcs/export_delete_all_params.rbi +42 -0
  189. data/rbi/telnyx/models/compute/funcs/export_list_params.rbi +42 -0
  190. data/rbi/telnyx/models/compute/funcs/func_log_export_config_response.rbi +227 -0
  191. data/rbi/telnyx/models/compute/functions_observability_pagination_meta.rbi +70 -0
  192. data/rbi/telnyx/models/compute/logs_meta.rbi +38 -0
  193. data/rbi/telnyx/models/connection_retrieve_count_params.rbi +30 -0
  194. data/rbi/telnyx/models/connection_retrieve_count_response.rbi +353 -0
  195. data/rbi/telnyx/models/credential_connection.rbi +8 -2
  196. data/rbi/telnyx/models/detail_record_list_params.rbi +30 -2
  197. data/rbi/telnyx/models/email_inboxes/email_message.rbi +22 -3
  198. data/rbi/telnyx/models/email_message_batch_params.rbi +6 -0
  199. data/rbi/telnyx/models/email_message_batch_response.rbi +5 -0
  200. data/rbi/telnyx/models/fqdn_connection.rbi +8 -2
  201. data/rbi/telnyx/models/fqdn_connections/fqdn_authentication.rbi +8 -2
  202. data/rbi/telnyx/models/inbound_message_webhook_event.rbi +4 -173
  203. data/rbi/telnyx/models/machine_payment_account_credit_params.rbi +51 -0
  204. data/rbi/telnyx/models/machine_payment_account_credit_response.rbi +446 -0
  205. data/rbi/telnyx/models/message_retrieve_group_messages_response.rbi +6 -12
  206. data/rbi/telnyx/models/message_retrieve_response.rbi +3 -3
  207. data/rbi/telnyx/models/message_schedule_response.rbi +4 -6
  208. data/rbi/telnyx/models/message_send_group_mms_response.rbi +4 -6
  209. data/rbi/telnyx/models/message_send_long_code_response.rbi +4 -6
  210. data/rbi/telnyx/models/message_send_number_pool_response.rbi +4 -6
  211. data/rbi/telnyx/models/message_send_response.rbi +4 -6
  212. data/rbi/telnyx/models/message_send_short_code_response.rbi +4 -6
  213. data/rbi/telnyx/models/messaging_inbound_message.rbi +152 -0
  214. data/rbi/telnyx/models/messaging_inbound_message_payload.rbi +911 -192
  215. data/rbi/telnyx/models/messaging_messaging_profile.rbi +19 -0
  216. data/rbi/telnyx/models/messaging_outbound_message_payload.rbi +90 -16
  217. data/rbi/telnyx/models/messaging_profile_create_params.rbi +19 -0
  218. data/rbi/telnyx/models/messaging_profile_features.rbi +43 -0
  219. data/rbi/telnyx/models/messaging_profile_update_params.rbi +19 -0
  220. data/rbi/telnyx/models/noise_suppression_engine_list_params.rbi +30 -0
  221. data/rbi/telnyx/models/noise_suppression_engine_list_response.rbi +94 -0
  222. data/rbi/telnyx/models/number_order_status_update.rbi +34 -3
  223. data/rbi/telnyx/models/number_order_status_update_webhook_event.rbi +39 -3
  224. data/rbi/telnyx/models/outbound_message.rbi +5 -0
  225. data/rbi/telnyx/models/outbound_message_payload.rbi +74 -4
  226. data/rbi/telnyx/models/speech_to_text_retrieve_transcription_params.rbi +5 -0
  227. data/rbi/telnyx/models/success_response.rbi +36 -0
  228. data/rbi/telnyx/models/texml/accounts/call_calls_params.rbi +339 -0
  229. data/rbi/telnyx/models/texml/accounts/conferences/participant_participants_params.rbi +111 -0
  230. data/rbi/telnyx/models/texml/call_create_params.rbi +124 -0
  231. data/rbi/telnyx/models/texml/call_create_response.rbi +98 -0
  232. data/rbi/telnyx/models/texml_initiate_ai_call_params.rbi +103 -0
  233. data/rbi/telnyx/models/uac_connection.rbi +8 -2
  234. data/rbi/telnyx/models/uac_external_settings.rbi +10 -2
  235. data/rbi/telnyx/models/unsafe_unwrap_webhook_event.rbi +3 -1
  236. data/rbi/telnyx/models/unwrap_webhook_event.rbi +3 -1
  237. data/rbi/telnyx/models/voice_clone_create_from_upload_params.rbi +4 -4
  238. data/rbi/telnyx/models/whatsapp/business_accounts/phone_number_list_response.rbi +213 -0
  239. data/rbi/telnyx/models/whatsapp/phone_number_get_response.rbi +213 -0
  240. data/rbi/telnyx/models/whatsapp/phone_number_list_response.rbi +213 -0
  241. data/rbi/telnyx/models/whatsapp/phone_number_retrieve_phone_number_params.rbi +40 -0
  242. data/rbi/telnyx/models/whatsapp/phone_number_retrieve_phone_number_response.rbi +401 -0
  243. data/rbi/telnyx/models/whatsapp_account_update.rbi +236 -0
  244. data/rbi/telnyx/models/whatsapp_message_echo.rbi +611 -0
  245. data/rbi/telnyx/models/x402/credit_account/payment_list_params.rbi +64 -0
  246. data/rbi/telnyx/models/x402/credit_account/payment_retrieve_params.rbi +42 -0
  247. data/rbi/telnyx/models/x402/credit_account/payment_retrieve_response.rbi +53 -0
  248. data/rbi/telnyx/models/x402/credit_account/x402_transaction_record.rbi +219 -0
  249. data/rbi/telnyx/models.rbi +29 -0
  250. data/rbi/telnyx/resources/ai/assistants/versions.rbi +31 -7
  251. data/rbi/telnyx/resources/ai/assistants.rbi +46 -12
  252. data/rbi/telnyx/resources/ai/audio.rbi +20 -9
  253. data/rbi/telnyx/resources/ai/openai/chat.rbi +9 -13
  254. data/rbi/telnyx/resources/ai/typesafe/v1.rbi +61 -0
  255. data/rbi/telnyx/resources/ai/typesafe.rbi +19 -0
  256. data/rbi/telnyx/resources/ai.rbi +3 -0
  257. data/rbi/telnyx/resources/bot_challenge.rbi +45 -0
  258. data/rbi/telnyx/resources/bot_sessions.rbi +45 -0
  259. data/rbi/telnyx/resources/bot_signup.rbi +87 -0
  260. data/rbi/telnyx/resources/calls/actions.rbi +6 -5
  261. data/rbi/telnyx/resources/calls.rbi +6 -5
  262. data/rbi/telnyx/resources/compute/funcs/export.rbi +86 -0
  263. data/rbi/telnyx/resources/compute/funcs.rbi +114 -0
  264. data/rbi/telnyx/resources/compute.rbi +15 -0
  265. data/rbi/telnyx/resources/connections.rbi +11 -0
  266. data/rbi/telnyx/resources/detail_records.rbi +12 -1
  267. data/rbi/telnyx/resources/email_messages.rbi +8 -2
  268. data/rbi/telnyx/resources/machine_payments.rbi +64 -0
  269. data/rbi/telnyx/resources/messaging_profiles.rbi +10 -0
  270. data/rbi/telnyx/resources/noise_suppression_engines.rbi +26 -0
  271. data/rbi/telnyx/resources/texml/accounts/conferences/participants.rbi +32 -0
  272. data/rbi/telnyx/resources/texml/calls.rbi +50 -0
  273. data/rbi/telnyx/resources/texml.rbi +36 -0
  274. data/rbi/telnyx/resources/voice_clones.rbi +4 -2
  275. data/rbi/telnyx/resources/webhooks.rbi +6 -2
  276. data/rbi/telnyx/resources/whatsapp/phone_numbers.rbi +18 -0
  277. data/rbi/telnyx/resources/x402/credit_account/payments.rbi +60 -0
  278. data/rbi/telnyx/resources/x402/credit_account.rbi +5 -0
  279. data/sig/telnyx/client.rbs +12 -0
  280. data/sig/telnyx/models/ai/assistant_a2_a_agent.rbs +140 -0
  281. data/sig/telnyx/models/ai/assistant_create_params.rbs +9 -0
  282. data/sig/telnyx/models/ai/assistant_tool.rbs +162 -23
  283. data/sig/telnyx/models/ai/assistant_update_params.rbs +9 -0
  284. data/sig/telnyx/models/ai/assistants/update_assistant.rbs +9 -0
  285. data/sig/telnyx/models/ai/audio_transcribe_params.rbs +10 -0
  286. data/sig/telnyx/models/ai/audio_transcribe_response.rbs +29 -43
  287. data/sig/telnyx/models/ai/audio_transcription_response_word.rbs +60 -0
  288. data/sig/telnyx/models/ai/chat_completion_request.rbs +90 -79
  289. data/sig/telnyx/models/ai/inference_embedding.rbs +9 -0
  290. data/sig/telnyx/models/ai/inference_embedding_interruption_settings.rbs +5 -0
  291. data/sig/telnyx/models/ai/inference_embedding_webhook_tool_params.rbs +10 -3
  292. data/sig/telnyx/models/ai/openai/function_definition.rbs +34 -0
  293. data/sig/telnyx/models/ai/privacy_settings.rbs +11 -3
  294. data/sig/telnyx/models/ai/retrieval_tool.rbs +10 -3
  295. data/sig/telnyx/models/ai/telephony_settings.rbs +59 -4
  296. data/sig/telnyx/models/ai/transcription_settings.rbs +4 -0
  297. data/sig/telnyx/models/ai/typesafe/v1_systemone_params.rbs +195 -0
  298. data/sig/telnyx/models/ai/typesafe/v1_systemone_response.rbs +141 -0
  299. data/sig/telnyx/models/bot_challenge_create_params.rbs +42 -0
  300. data/sig/telnyx/models/bot_challenge_create_response.rbs +72 -0
  301. data/sig/telnyx/models/bot_session_list_params.rbs +28 -0
  302. data/sig/telnyx/models/bot_session_list_response.rbs +26 -0
  303. data/sig/telnyx/models/bot_signup_create_params.rbs +89 -0
  304. data/sig/telnyx/models/bot_signup_resend_magic_link_params.rbs +20 -0
  305. data/sig/telnyx/models/call_dial_params.rbs +49 -0
  306. data/sig/telnyx/models/calls/action_transfer_params.rbs +49 -0
  307. data/sig/telnyx/models/calls/transcription_config.rbs +4 -0
  308. data/sig/telnyx/models/calls/transcription_engine_assemblyai_config.rbs +3 -1
  309. data/sig/telnyx/models/calls/transcription_engine_parakeet_config.rbs +3 -1
  310. data/sig/telnyx/models/compute/func_retrieve_logs_params.rbs +69 -0
  311. data/sig/telnyx/models/compute/func_retrieve_logs_response.rbs +210 -0
  312. data/sig/telnyx/models/compute/func_retrieve_metric_aggregates_params.rbs +66 -0
  313. data/sig/telnyx/models/compute/func_retrieve_metric_aggregates_response.rbs +149 -0
  314. data/sig/telnyx/models/compute/func_retrieve_revisions_params.rbs +38 -0
  315. data/sig/telnyx/models/compute/func_retrieve_revisions_response.rbs +131 -0
  316. data/sig/telnyx/models/compute/func_retrieve_ship_inspection_params.rbs +22 -0
  317. data/sig/telnyx/models/compute/func_retrieve_ship_inspection_response.rbs +117 -0
  318. data/sig/telnyx/models/compute/funcs/export_create_params.rbs +50 -0
  319. data/sig/telnyx/models/compute/funcs/export_delete_all_params.rbs +27 -0
  320. data/sig/telnyx/models/compute/funcs/export_list_params.rbs +27 -0
  321. data/sig/telnyx/models/compute/funcs/func_log_export_config_response.rbs +115 -0
  322. data/sig/telnyx/models/compute/functions_observability_pagination_meta.rbs +45 -0
  323. data/sig/telnyx/models/compute/logs_meta.rbs +21 -0
  324. data/sig/telnyx/models/connection_retrieve_count_params.rbs +15 -0
  325. data/sig/telnyx/models/connection_retrieve_count_response.rbs +169 -0
  326. data/sig/telnyx/models/email_inboxes/email_message.rbs +12 -3
  327. data/sig/telnyx/models/email_message_batch_response.rbs +2 -0
  328. data/sig/telnyx/models/inbound_message_webhook_event.rbs +6 -79
  329. data/sig/telnyx/models/machine_payment_account_credit_params.rbs +23 -0
  330. data/sig/telnyx/models/machine_payment_account_credit_response.rbs +164 -0
  331. data/sig/telnyx/models/message_retrieve_group_messages_response.rbs +6 -8
  332. data/sig/telnyx/models/message_retrieve_response.rbs +1 -2
  333. data/sig/telnyx/models/message_schedule_response.rbs +6 -7
  334. data/sig/telnyx/models/message_send_group_mms_response.rbs +6 -6
  335. data/sig/telnyx/models/message_send_long_code_response.rbs +6 -6
  336. data/sig/telnyx/models/message_send_number_pool_response.rbs +6 -6
  337. data/sig/telnyx/models/message_send_response.rbs +6 -7
  338. data/sig/telnyx/models/message_send_short_code_response.rbs +6 -6
  339. data/sig/telnyx/models/messaging_inbound_message.rbs +76 -0
  340. data/sig/telnyx/models/messaging_inbound_message_payload.rbs +438 -97
  341. data/sig/telnyx/models/messaging_messaging_profile.rbs +5 -0
  342. data/sig/telnyx/models/messaging_outbound_message_payload.rbs +39 -1
  343. data/sig/telnyx/models/messaging_profile_create_params.rbs +5 -0
  344. data/sig/telnyx/models/messaging_profile_features.rbs +15 -0
  345. data/sig/telnyx/models/messaging_profile_update_params.rbs +5 -0
  346. data/sig/telnyx/models/noise_suppression_engine_list_params.rbs +15 -0
  347. data/sig/telnyx/models/noise_suppression_engine_list_response.rbs +43 -0
  348. data/sig/telnyx/models/number_order_status_update.rbs +14 -4
  349. data/sig/telnyx/models/number_order_status_update_webhook_event.rbs +14 -4
  350. data/sig/telnyx/models/outbound_message.rbs +2 -1
  351. data/sig/telnyx/models/outbound_message_payload.rbs +45 -7
  352. data/sig/telnyx/models/speech_to_text_retrieve_transcription_params.rbs +2 -0
  353. data/sig/telnyx/models/success_response.rbs +15 -0
  354. data/sig/telnyx/models/texml/accounts/call_calls_params.rbs +159 -0
  355. data/sig/telnyx/models/texml/accounts/conferences/participant_participants_params.rbs +49 -0
  356. data/sig/telnyx/models/texml/call_create_params.rbs +72 -0
  357. data/sig/telnyx/models/texml/call_create_response.rbs +47 -0
  358. data/sig/telnyx/models/texml_initiate_ai_call_params.rbs +49 -0
  359. data/sig/telnyx/models/unsafe_unwrap_webhook_event.rbs +2 -0
  360. data/sig/telnyx/models/unwrap_webhook_event.rbs +2 -0
  361. data/sig/telnyx/models/whatsapp/business_accounts/phone_number_list_response.rbs +90 -0
  362. data/sig/telnyx/models/whatsapp/phone_number_get_response.rbs +90 -0
  363. data/sig/telnyx/models/whatsapp/phone_number_list_response.rbs +90 -0
  364. data/sig/telnyx/models/whatsapp/phone_number_retrieve_phone_number_params.rbs +25 -0
  365. data/sig/telnyx/models/whatsapp/phone_number_retrieve_phone_number_response.rbs +201 -0
  366. data/sig/telnyx/models/whatsapp_account_update.rbs +107 -0
  367. data/sig/telnyx/models/whatsapp_message_echo.rbs +291 -0
  368. data/sig/telnyx/models/x402/credit_account/payment_list_params.rbs +36 -0
  369. data/sig/telnyx/models/x402/credit_account/payment_retrieve_params.rbs +27 -0
  370. data/sig/telnyx/models/x402/credit_account/payment_retrieve_response.rbs +26 -0
  371. data/sig/telnyx/models/x402/credit_account/x402_transaction_record.rbs +104 -0
  372. data/sig/telnyx/models.rbs +26 -0
  373. data/sig/telnyx/resources/ai/assistants/versions.rbs +1 -0
  374. data/sig/telnyx/resources/ai/assistants.rbs +2 -0
  375. data/sig/telnyx/resources/ai/openai/chat.rbs +1 -4
  376. data/sig/telnyx/resources/ai/typesafe/v1.rbs +17 -0
  377. data/sig/telnyx/resources/ai/typesafe.rbs +11 -0
  378. data/sig/telnyx/resources/ai.rbs +2 -0
  379. data/sig/telnyx/resources/bot_challenge.rbs +14 -0
  380. data/sig/telnyx/resources/bot_sessions.rbs +13 -0
  381. data/sig/telnyx/resources/bot_signup.rbs +24 -0
  382. data/sig/telnyx/resources/compute/funcs/export.rbs +30 -0
  383. data/sig/telnyx/resources/compute/funcs.rbs +43 -0
  384. data/sig/telnyx/resources/compute.rbs +9 -0
  385. data/sig/telnyx/resources/connections.rbs +4 -0
  386. data/sig/telnyx/resources/machine_payments.rbs +12 -0
  387. data/sig/telnyx/resources/messaging_profiles.rbs +2 -0
  388. data/sig/telnyx/resources/noise_suppression_engines.rbs +11 -0
  389. data/sig/telnyx/resources/texml/accounts/conferences/participants.rbs +7 -0
  390. data/sig/telnyx/resources/texml/calls.rbs +19 -0
  391. data/sig/telnyx/resources/texml.rbs +9 -0
  392. data/sig/telnyx/resources/webhooks.rbs +6 -2
  393. data/sig/telnyx/resources/whatsapp/phone_numbers.rbs +5 -0
  394. data/sig/telnyx/resources/x402/credit_account/payments.rbs +22 -0
  395. data/sig/telnyx/resources/x402/credit_account.rbs +2 -0
  396. metadata +170 -2
@@ -56,28 +56,6 @@ module Telnyx
56
56
  sig { params(frequency_penalty: Float).void }
57
57
  attr_writer :frequency_penalty
58
58
 
59
- # If specified, the output will be exactly one of the choices.
60
- sig { returns(T.nilable(T::Array[String])) }
61
- attr_reader :guided_choice
62
-
63
- sig { params(guided_choice: T::Array[String]).void }
64
- attr_writer :guided_choice
65
-
66
- # Must be a valid JSON schema. If specified, the output will follow the JSON
67
- # schema.
68
- sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
69
- attr_reader :guided_json
70
-
71
- sig { params(guided_json: T::Hash[Symbol, T.anything]).void }
72
- attr_writer :guided_json
73
-
74
- # If specified, the output will follow the regex pattern.
75
- sig { returns(T.nilable(String)) }
76
- attr_reader :guided_regex
77
-
78
- sig { params(guided_regex: String).void }
79
- attr_writer :guided_regex
80
-
81
59
  # This is used with `use_beam_search` to prefer shorter or longer completions.
82
60
  sig { returns(T.nilable(Float)) }
83
61
  attr_reader :length_penalty
@@ -187,17 +165,31 @@ module Telnyx
187
165
  end
188
166
  attr_writer :region
189
167
 
190
- # Use this is you want to guarantee a JSON output without defining a schema. For
191
- # control over the schema, use `guided_json`.
168
+ # Controls the format of the model output. `json_object` guarantees valid JSON
169
+ # output without defining a schema; `json_schema` constrains the output to the
170
+ # JSON schema you supply via the `json_schema` property and is the supported way
171
+ # to get guaranteed structured output on Telnyx-hosted models.
192
172
  sig do
193
- returns(T.nilable(Telnyx::AI::ChatCompletionRequest::ResponseFormat))
173
+ returns(
174
+ T.nilable(
175
+ T.any(
176
+ Telnyx::AI::ChatCompletionRequest::ResponseFormat::ResponseFormatText,
177
+ Telnyx::AI::ChatCompletionRequest::ResponseFormat::ResponseFormatJsonObject,
178
+ Telnyx::AI::ChatCompletionRequest::ResponseFormat::ResponseFormatJsonSchemaParam
179
+ )
180
+ )
181
+ )
194
182
  end
195
183
  attr_reader :response_format
196
184
 
197
185
  sig do
198
186
  params(
199
187
  response_format:
200
- Telnyx::AI::ChatCompletionRequest::ResponseFormat::OrHash
188
+ T.any(
189
+ Telnyx::AI::ChatCompletionRequest::ResponseFormat::ResponseFormatText::OrHash,
190
+ Telnyx::AI::ChatCompletionRequest::ResponseFormat::ResponseFormatJsonObject::OrHash,
191
+ Telnyx::AI::ChatCompletionRequest::ResponseFormat::ResponseFormatJsonSchemaParam::OrHash
192
+ )
201
193
  ).void
202
194
  end
203
195
  attr_writer :response_format
@@ -329,9 +321,6 @@ module Telnyx
329
321
  early_stopping: T::Boolean,
330
322
  enable_thinking: T::Boolean,
331
323
  frequency_penalty: Float,
332
- guided_choice: T::Array[String],
333
- guided_json: T::Hash[Symbol, T.anything],
334
- guided_regex: String,
335
324
  length_penalty: Float,
336
325
  logprobs: T::Boolean,
337
326
  max_tokens: Integer,
@@ -344,7 +333,11 @@ module Telnyx
344
333
  Telnyx::AI::ChatCompletionRequest::ReasoningEffort::OrSymbol,
345
334
  region: Telnyx::AI::ChatCompletionRequest::Region::OrSymbol,
346
335
  response_format:
347
- Telnyx::AI::ChatCompletionRequest::ResponseFormat::OrHash,
336
+ T.any(
337
+ Telnyx::AI::ChatCompletionRequest::ResponseFormat::ResponseFormatText::OrHash,
338
+ Telnyx::AI::ChatCompletionRequest::ResponseFormat::ResponseFormatJsonObject::OrHash,
339
+ Telnyx::AI::ChatCompletionRequest::ResponseFormat::ResponseFormatJsonSchemaParam::OrHash
340
+ ),
348
341
  seed: Integer,
349
342
  service_tier: String,
350
343
  stop: Telnyx::AI::ChatCompletionRequest::Stop::Variants,
@@ -385,13 +378,6 @@ module Telnyx
385
378
  enable_thinking: nil,
386
379
  # Higher values will penalize the model from repeating the same output tokens.
387
380
  frequency_penalty: nil,
388
- # If specified, the output will be exactly one of the choices.
389
- guided_choice: nil,
390
- # Must be a valid JSON schema. If specified, the output will follow the JSON
391
- # schema.
392
- guided_json: nil,
393
- # If specified, the output will follow the regex pattern.
394
- guided_regex: nil,
395
381
  # This is used with `use_beam_search` to prefer shorter or longer completions.
396
382
  length_penalty: nil,
397
383
  # Whether to return log probabilities of the output tokens or not. If true,
@@ -428,8 +414,10 @@ module Telnyx
428
414
  # provider never passes through Telnyx model routing, so a region cannot be
429
415
  # enforced for it. Omit for today's latency-based routing.
430
416
  region: nil,
431
- # Use this is you want to guarantee a JSON output without defining a schema. For
432
- # control over the schema, use `guided_json`.
417
+ # Controls the format of the model output. `json_object` guarantees valid JSON
418
+ # output without defining a schema; `json_schema` constrains the output to the
419
+ # JSON schema you supply via the `json_schema` property and is the supported way
420
+ # to get guaranteed structured output on Telnyx-hosted models.
433
421
  response_format: nil,
434
422
  # If specified, the system will make a best effort to sample deterministically,
435
423
  # such that repeated requests with the same `seed` and parameters should return
@@ -478,9 +466,6 @@ module Telnyx
478
466
  early_stopping: T::Boolean,
479
467
  enable_thinking: T::Boolean,
480
468
  frequency_penalty: Float,
481
- guided_choice: T::Array[String],
482
- guided_json: T::Hash[Symbol, T.anything],
483
- guided_regex: String,
484
469
  length_penalty: Float,
485
470
  logprobs: T::Boolean,
486
471
  max_tokens: Integer,
@@ -493,7 +478,11 @@ module Telnyx
493
478
  Telnyx::AI::ChatCompletionRequest::ReasoningEffort::OrSymbol,
494
479
  region: Telnyx::AI::ChatCompletionRequest::Region::OrSymbol,
495
480
  response_format:
496
- Telnyx::AI::ChatCompletionRequest::ResponseFormat,
481
+ T.any(
482
+ Telnyx::AI::ChatCompletionRequest::ResponseFormat::ResponseFormatText,
483
+ Telnyx::AI::ChatCompletionRequest::ResponseFormat::ResponseFormatJsonObject,
484
+ Telnyx::AI::ChatCompletionRequest::ResponseFormat::ResponseFormatJsonSchemaParam
485
+ ),
497
486
  seed: Integer,
498
487
  service_tier: String,
499
488
  stop: Telnyx::AI::ChatCompletionRequest::Stop::Variants,
@@ -848,77 +837,220 @@ module Telnyx
848
837
  end
849
838
  end
850
839
 
851
- class ResponseFormat < Telnyx::Internal::Type::BaseModel
852
- OrHash =
840
+ # Controls the format of the model output. `json_object` guarantees valid JSON
841
+ # output without defining a schema; `json_schema` constrains the output to the
842
+ # JSON schema you supply via the `json_schema` property and is the supported way
843
+ # to get guaranteed structured output on Telnyx-hosted models.
844
+ module ResponseFormat
845
+ extend Telnyx::Internal::Type::Union
846
+
847
+ Variants =
853
848
  T.type_alias do
854
849
  T.any(
855
- Telnyx::AI::ChatCompletionRequest::ResponseFormat,
856
- Telnyx::Internal::AnyHash
850
+ Telnyx::AI::ChatCompletionRequest::ResponseFormat::ResponseFormatText,
851
+ Telnyx::AI::ChatCompletionRequest::ResponseFormat::ResponseFormatJsonObject,
852
+ Telnyx::AI::ChatCompletionRequest::ResponseFormat::ResponseFormatJsonSchemaParam
857
853
  )
858
854
  end
859
855
 
860
- sig do
861
- returns(
862
- Telnyx::AI::ChatCompletionRequest::ResponseFormat::Type::OrSymbol
863
- )
864
- end
865
- attr_accessor :type
856
+ class ResponseFormatText < Telnyx::Internal::Type::BaseModel
857
+ OrHash =
858
+ T.type_alias do
859
+ T.any(
860
+ Telnyx::AI::ChatCompletionRequest::ResponseFormat::ResponseFormatText,
861
+ Telnyx::Internal::AnyHash
862
+ )
863
+ end
866
864
 
867
- # Use this is you want to guarantee a JSON output without defining a schema. For
868
- # control over the schema, use `guided_json`.
869
- sig do
870
- params(
871
- type:
872
- Telnyx::AI::ChatCompletionRequest::ResponseFormat::Type::OrSymbol
873
- ).returns(T.attached_class)
874
- end
875
- def self.new(type:)
876
- end
865
+ sig { returns(Symbol) }
866
+ attr_accessor :type
877
867
 
878
- sig do
879
- override.returns(
880
- {
881
- type:
882
- Telnyx::AI::ChatCompletionRequest::ResponseFormat::Type::OrSymbol
883
- }
884
- )
885
- end
886
- def to_hash
868
+ # Plain text output.
869
+ sig { params(type: Symbol).returns(T.attached_class) }
870
+ def self.new(type: :text)
871
+ end
872
+
873
+ sig { override.returns({ type: Symbol }) }
874
+ def to_hash
875
+ end
887
876
  end
888
877
 
889
- module Type
890
- extend Telnyx::Internal::Type::Enum
878
+ class ResponseFormatJsonObject < Telnyx::Internal::Type::BaseModel
879
+ OrHash =
880
+ T.type_alias do
881
+ T.any(
882
+ Telnyx::AI::ChatCompletionRequest::ResponseFormat::ResponseFormatJsonObject,
883
+ Telnyx::Internal::AnyHash
884
+ )
885
+ end
891
886
 
892
- TaggedSymbol =
887
+ sig { returns(Symbol) }
888
+ attr_accessor :type
889
+
890
+ # JSON mode: the model output is valid JSON, without a schema.
891
+ sig { params(type: Symbol).returns(T.attached_class) }
892
+ def self.new(type: :json_object)
893
+ end
894
+
895
+ sig { override.returns({ type: Symbol }) }
896
+ def to_hash
897
+ end
898
+ end
899
+
900
+ class ResponseFormatJsonSchemaParam < Telnyx::Internal::Type::BaseModel
901
+ OrHash =
893
902
  T.type_alias do
894
- T.all(
895
- Symbol,
896
- Telnyx::AI::ChatCompletionRequest::ResponseFormat::Type
903
+ T.any(
904
+ Telnyx::AI::ChatCompletionRequest::ResponseFormat::ResponseFormatJsonSchemaParam,
905
+ Telnyx::Internal::AnyHash
897
906
  )
898
907
  end
899
- OrSymbol = T.type_alias { T.any(Symbol, String) }
900
908
 
901
- TEXT =
902
- T.let(
903
- :text,
904
- Telnyx::AI::ChatCompletionRequest::ResponseFormat::Type::TaggedSymbol
905
- )
906
- JSON_OBJECT =
907
- T.let(
908
- :json_object,
909
- Telnyx::AI::ChatCompletionRequest::ResponseFormat::Type::TaggedSymbol
909
+ # The JSON schema configuration, required when `type` is `json_schema`. Matches
910
+ # the
911
+ # [OpenAI structured outputs](https://platform.openai.com/docs/guides/structured-outputs)
912
+ # `json_schema` response format.
913
+ sig do
914
+ returns(
915
+ Telnyx::AI::ChatCompletionRequest::ResponseFormat::ResponseFormatJsonSchemaParam::JsonSchema
910
916
  )
917
+ end
918
+ attr_reader :json_schema
919
+
920
+ sig do
921
+ params(
922
+ json_schema:
923
+ Telnyx::AI::ChatCompletionRequest::ResponseFormat::ResponseFormatJsonSchemaParam::JsonSchema::OrHash
924
+ ).void
925
+ end
926
+ attr_writer :json_schema
927
+
928
+ sig { returns(Symbol) }
929
+ attr_accessor :type
930
+
931
+ # Structured output: the model output is constrained to the JSON schema supplied
932
+ # in `json_schema`.
933
+ sig do
934
+ params(
935
+ json_schema:
936
+ Telnyx::AI::ChatCompletionRequest::ResponseFormat::ResponseFormatJsonSchemaParam::JsonSchema::OrHash,
937
+ type: Symbol
938
+ ).returns(T.attached_class)
939
+ end
940
+ def self.new(
941
+ # The JSON schema configuration, required when `type` is `json_schema`. Matches
942
+ # the
943
+ # [OpenAI structured outputs](https://platform.openai.com/docs/guides/structured-outputs)
944
+ # `json_schema` response format.
945
+ json_schema:,
946
+ type: :json_schema
947
+ )
948
+ end
911
949
 
912
950
  sig do
913
951
  override.returns(
914
- T::Array[
915
- Telnyx::AI::ChatCompletionRequest::ResponseFormat::Type::TaggedSymbol
916
- ]
952
+ {
953
+ json_schema:
954
+ Telnyx::AI::ChatCompletionRequest::ResponseFormat::ResponseFormatJsonSchemaParam::JsonSchema,
955
+ type: Symbol
956
+ }
917
957
  )
918
958
  end
919
- def self.values
959
+ def to_hash
960
+ end
961
+
962
+ class JsonSchema < Telnyx::Internal::Type::BaseModel
963
+ OrHash =
964
+ T.type_alias do
965
+ T.any(
966
+ Telnyx::AI::ChatCompletionRequest::ResponseFormat::ResponseFormatJsonSchemaParam::JsonSchema,
967
+ Telnyx::Internal::AnyHash
968
+ )
969
+ end
970
+
971
+ # The name of the response format. Used for clarity only.
972
+ sig { returns(String) }
973
+ attr_accessor :name
974
+
975
+ # A description of what the response format is for, typically used to guide the
976
+ # model.
977
+ sig { returns(T.nilable(String)) }
978
+ attr_reader :description
979
+
980
+ sig { params(description: String).void }
981
+ attr_writer :description
982
+
983
+ # The JSON schema the model output must conform to. A valid
984
+ # [JSON Schema](https://json-schema.org) object, e.g. a Pydantic
985
+ # `model_json_schema()` export.
986
+ sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
987
+ attr_reader :schema
988
+
989
+ sig { params(schema: T::Hash[Symbol, T.anything]).void }
990
+ attr_writer :schema
991
+
992
+ # Enables strict schema adherence when supported by the model. If the generated
993
+ # output does not match the provided schema, the request fails instead of
994
+ # returning non-conformant output.
995
+ sig { returns(T.nilable(T::Boolean)) }
996
+ attr_reader :strict
997
+
998
+ sig { params(strict: T::Boolean).void }
999
+ attr_writer :strict
1000
+
1001
+ # The JSON schema configuration, required when `type` is `json_schema`. Matches
1002
+ # the
1003
+ # [OpenAI structured outputs](https://platform.openai.com/docs/guides/structured-outputs)
1004
+ # `json_schema` response format.
1005
+ sig do
1006
+ params(
1007
+ name: String,
1008
+ description: String,
1009
+ schema: T::Hash[Symbol, T.anything],
1010
+ strict: T::Boolean
1011
+ ).returns(T.attached_class)
1012
+ end
1013
+ def self.new(
1014
+ # The name of the response format. Used for clarity only.
1015
+ name:,
1016
+ # A description of what the response format is for, typically used to guide the
1017
+ # model.
1018
+ description: nil,
1019
+ # The JSON schema the model output must conform to. A valid
1020
+ # [JSON Schema](https://json-schema.org) object, e.g. a Pydantic
1021
+ # `model_json_schema()` export.
1022
+ schema: nil,
1023
+ # Enables strict schema adherence when supported by the model. If the generated
1024
+ # output does not match the provided schema, the request fails instead of
1025
+ # returning non-conformant output.
1026
+ strict: nil
1027
+ )
1028
+ end
1029
+
1030
+ sig do
1031
+ override.returns(
1032
+ {
1033
+ name: String,
1034
+ description: String,
1035
+ schema: T::Hash[Symbol, T.anything],
1036
+ strict: T::Boolean
1037
+ }
1038
+ )
1039
+ end
1040
+ def to_hash
1041
+ end
920
1042
  end
921
1043
  end
1044
+
1045
+ sig do
1046
+ override.returns(
1047
+ T::Array[
1048
+ Telnyx::AI::ChatCompletionRequest::ResponseFormat::Variants
1049
+ ]
1050
+ )
1051
+ end
1052
+ def self.variants
1053
+ end
922
1054
  end
923
1055
 
924
1056
  # Up to 4 sequences where the API will stop generating further tokens. The
@@ -999,17 +1131,12 @@ module Telnyx
999
1131
  )
1000
1132
  end
1001
1133
 
1002
- sig do
1003
- returns(
1004
- Telnyx::AI::ChatCompletionRequest::Tool::Function::Function
1005
- )
1006
- end
1134
+ sig { returns(Telnyx::AI::OpenAI::FunctionDefinition) }
1007
1135
  attr_reader :function
1008
1136
 
1009
1137
  sig do
1010
1138
  params(
1011
- function:
1012
- Telnyx::AI::ChatCompletionRequest::Tool::Function::Function::OrHash
1139
+ function: Telnyx::AI::OpenAI::FunctionDefinition::OrHash
1013
1140
  ).void
1014
1141
  end
1015
1142
  attr_writer :function
@@ -1019,8 +1146,7 @@ module Telnyx
1019
1146
 
1020
1147
  sig do
1021
1148
  params(
1022
- function:
1023
- Telnyx::AI::ChatCompletionRequest::Tool::Function::Function::OrHash,
1149
+ function: Telnyx::AI::OpenAI::FunctionDefinition::OrHash,
1024
1150
  type: Symbol
1025
1151
  ).returns(T.attached_class)
1026
1152
  end
@@ -1030,61 +1156,13 @@ module Telnyx
1030
1156
  sig do
1031
1157
  override.returns(
1032
1158
  {
1033
- function:
1034
- Telnyx::AI::ChatCompletionRequest::Tool::Function::Function,
1159
+ function: Telnyx::AI::OpenAI::FunctionDefinition,
1035
1160
  type: Symbol
1036
1161
  }
1037
1162
  )
1038
1163
  end
1039
1164
  def to_hash
1040
1165
  end
1041
-
1042
- class Function < Telnyx::Internal::Type::BaseModel
1043
- OrHash =
1044
- T.type_alias do
1045
- T.any(
1046
- Telnyx::AI::ChatCompletionRequest::Tool::Function::Function,
1047
- Telnyx::Internal::AnyHash
1048
- )
1049
- end
1050
-
1051
- sig { returns(String) }
1052
- attr_accessor :name
1053
-
1054
- sig { returns(T.nilable(String)) }
1055
- attr_reader :description
1056
-
1057
- sig { params(description: String).void }
1058
- attr_writer :description
1059
-
1060
- sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
1061
- attr_reader :parameters
1062
-
1063
- sig { params(parameters: T::Hash[Symbol, T.anything]).void }
1064
- attr_writer :parameters
1065
-
1066
- sig do
1067
- params(
1068
- name: String,
1069
- description: String,
1070
- parameters: T::Hash[Symbol, T.anything]
1071
- ).returns(T.attached_class)
1072
- end
1073
- def self.new(name:, description: nil, parameters: nil)
1074
- end
1075
-
1076
- sig do
1077
- override.returns(
1078
- {
1079
- name: String,
1080
- description: String,
1081
- parameters: T::Hash[Symbol, T.anything]
1082
- }
1083
- )
1084
- end
1085
- def to_hash
1086
- end
1087
- end
1088
1166
  end
1089
1167
 
1090
1168
  class Retrieval < Telnyx::Internal::Type::BaseModel
@@ -105,11 +105,12 @@ module Telnyx
105
105
  T::Array[
106
106
  T::Array[
107
107
  T.any(
108
+ Telnyx::AI::AssistantTool::Function::OrHash,
108
109
  Telnyx::AI::InferenceEmbeddingWebhookToolParams::OrHash,
109
110
  Telnyx::AI::AssistantTool::ClientSideTool::OrHash,
110
111
  Telnyx::AI::RetrievalTool::OrHash,
111
112
  Telnyx::AI::AssistantTool::Handoff::OrHash,
112
- Telnyx::AI::HangupTool::OrHash,
113
+ Telnyx::AI::AssistantTool::Hangup::OrHash,
113
114
  Telnyx::AI::AssistantTool::Transfer::OrHash,
114
115
  Telnyx::AI::AssistantTool::Invite::OrHash,
115
116
  Telnyx::AI::AssistantTool::Refer::OrHash,
@@ -177,11 +178,12 @@ module Telnyx
177
178
  T::Array[
178
179
  T::Array[
179
180
  T.any(
181
+ Telnyx::AI::AssistantTool::Function::OrHash,
180
182
  Telnyx::AI::InferenceEmbeddingWebhookToolParams::OrHash,
181
183
  Telnyx::AI::AssistantTool::ClientSideTool::OrHash,
182
184
  Telnyx::AI::RetrievalTool::OrHash,
183
185
  Telnyx::AI::AssistantTool::Handoff::OrHash,
184
- Telnyx::AI::HangupTool::OrHash,
186
+ Telnyx::AI::AssistantTool::Hangup::OrHash,
185
187
  Telnyx::AI::AssistantTool::Transfer::OrHash,
186
188
  Telnyx::AI::AssistantTool::Invite::OrHash,
187
189
  Telnyx::AI::AssistantTool::Refer::OrHash,
@@ -31,6 +31,24 @@ module Telnyx
31
31
  sig { returns(String) }
32
32
  attr_accessor :name
33
33
 
34
+ # A2A agents this assistant can delegate to. Tools are not stored here: at the
35
+ # start of every conversation each agent's card is fetched and one tool is derived
36
+ # per skill the card advertises, named `a2a_<name>_<skill_id>`. The following
37
+ # limits are not enforced when the assistant is saved, and anything past them is
38
+ # dropped when the conversation starts: 64 agents per assistant, 64 skills per
39
+ # card, 128 derived tools per assistant, and a 6 second budget for all card
40
+ # fetches combined. An agent whose card cannot be fetched costs the assistant that
41
+ # capability for the conversation; it does not fail the call.
42
+ sig { returns(T.nilable(T::Array[Telnyx::AI::AssistantA2AAgent])) }
43
+ attr_reader :a2a_agents
44
+
45
+ sig do
46
+ params(
47
+ a2a_agents: T::Array[Telnyx::AI::AssistantA2AAgent::OrHash]
48
+ ).void
49
+ end
50
+ attr_writer :a2a_agents
51
+
34
52
  # Conversation flow as returned by the API.
35
53
  sig { returns(T.nilable(Telnyx::AI::ConversationFlow)) }
36
54
  attr_reader :conversation_flow
@@ -204,10 +222,10 @@ module Telnyx
204
222
 
205
223
  # Configuration for post-conversation processing. When enabled, the assistant
206
224
  # receives one additional LLM turn after the conversation ends, allowing it to
207
- # execute tool calls such as logging to a CRM or sending a summary. The assistant
208
- # can execute multiple parallel or sequential tools during this phase.
209
- # Telephony-control tools (e.g. hangup, transfer) are unavailable
210
- # post-conversation. Beta feature.
225
+ # execute final tool calls such as sending a summary or updating a record via
226
+ # webhook or function tools. Integration and MCP server tools are not available
227
+ # post-conversation; call-control tools (e.g. hangup, transfer) are also
228
+ # unavailable. Beta feature.
211
229
  sig { returns(T.nilable(Telnyx::AI::PostConversationSettings)) }
212
230
  attr_reader :post_conversation_settings
213
231
 
@@ -250,9 +268,12 @@ module Telnyx
250
268
  end
251
269
  attr_writer :telephony_settings
252
270
 
253
- # Deprecated for new integrations. Inline tool definitions available to the
254
- # assistant. Prefer `tool_ids` to attach shared tools created with the AI Tools
255
- # endpoints.
271
+ # The assistant's tools. Responses merge the assistant's shared Tools Library
272
+ # tools into this array alongside inline tools, each flagged `shared: true`;
273
+ # inline tools carry `shared: false`. On update, a sent `tools` array fully
274
+ # replaces the inline tools only — shared tools stay attached unless `tool_ids`
275
+ # changes. Each tool type except `function`, `webhook`, and `client_side_tool`
276
+ # allows at most one instance per assistant across both sources.
256
277
  sig do
257
278
  returns(T.nilable(T::Array[Telnyx::AI::AssistantTool::Variants]))
258
279
  end
@@ -263,11 +284,12 @@ module Telnyx
263
284
  tools:
264
285
  T::Array[
265
286
  T.any(
287
+ Telnyx::AI::AssistantTool::Function::OrHash,
266
288
  Telnyx::AI::InferenceEmbeddingWebhookToolParams::OrHash,
267
289
  Telnyx::AI::AssistantTool::ClientSideTool::OrHash,
268
290
  Telnyx::AI::RetrievalTool::OrHash,
269
291
  Telnyx::AI::AssistantTool::Handoff::OrHash,
270
- Telnyx::AI::HangupTool::OrHash,
292
+ Telnyx::AI::AssistantTool::Hangup::OrHash,
271
293
  Telnyx::AI::AssistantTool::Transfer::OrHash,
272
294
  Telnyx::AI::AssistantTool::Invite::OrHash,
273
295
  Telnyx::AI::AssistantTool::Refer::OrHash,
@@ -332,6 +354,7 @@ module Telnyx
332
354
  instructions: String,
333
355
  model: String,
334
356
  name: String,
357
+ a2a_agents: T::Array[Telnyx::AI::AssistantA2AAgent::OrHash],
335
358
  conversation_flow: Telnyx::AI::ConversationFlow::OrHash,
336
359
  description: String,
337
360
  dynamic_variables: T::Hash[Symbol, T.anything],
@@ -359,11 +382,12 @@ module Telnyx
359
382
  tools:
360
383
  T::Array[
361
384
  T.any(
385
+ Telnyx::AI::AssistantTool::Function::OrHash,
362
386
  Telnyx::AI::InferenceEmbeddingWebhookToolParams::OrHash,
363
387
  Telnyx::AI::AssistantTool::ClientSideTool::OrHash,
364
388
  Telnyx::AI::RetrievalTool::OrHash,
365
389
  Telnyx::AI::AssistantTool::Handoff::OrHash,
366
- Telnyx::AI::HangupTool::OrHash,
390
+ Telnyx::AI::AssistantTool::Hangup::OrHash,
367
391
  Telnyx::AI::AssistantTool::Transfer::OrHash,
368
392
  Telnyx::AI::AssistantTool::Invite::OrHash,
369
393
  Telnyx::AI::AssistantTool::Refer::OrHash,
@@ -395,6 +419,15 @@ module Telnyx
395
419
  # provided, Telnyx applies the default model.
396
420
  model:,
397
421
  name:,
422
+ # A2A agents this assistant can delegate to. Tools are not stored here: at the
423
+ # start of every conversation each agent's card is fetched and one tool is derived
424
+ # per skill the card advertises, named `a2a_<name>_<skill_id>`. The following
425
+ # limits are not enforced when the assistant is saved, and anything past them is
426
+ # dropped when the conversation starts: 64 agents per assistant, 64 skills per
427
+ # card, 128 derived tools per assistant, and a 6 second budget for all card
428
+ # fetches combined. An agent whose card cannot be fetched costs the assistant that
429
+ # capability for the conversation; it does not fail the call.
430
+ a2a_agents: nil,
398
431
  # Conversation flow as returned by the API.
399
432
  conversation_flow: nil,
400
433
  description: nil,
@@ -452,10 +485,10 @@ module Telnyx
452
485
  observability_settings: nil,
453
486
  # Configuration for post-conversation processing. When enabled, the assistant
454
487
  # receives one additional LLM turn after the conversation ends, allowing it to
455
- # execute tool calls such as logging to a CRM or sending a summary. The assistant
456
- # can execute multiple parallel or sequential tools during this phase.
457
- # Telephony-control tools (e.g. hangup, transfer) are unavailable
458
- # post-conversation. Beta feature.
488
+ # execute final tool calls such as sending a summary or updating a record via
489
+ # webhook or function tools. Integration and MCP server tools are not available
490
+ # post-conversation; call-control tools (e.g. hangup, transfer) are also
491
+ # unavailable. Beta feature.
459
492
  post_conversation_settings: nil,
460
493
  privacy_settings: nil,
461
494
  # IDs of missions related to this assistant.
@@ -464,9 +497,12 @@ module Telnyx
464
497
  # tag endpoints.
465
498
  tags: nil,
466
499
  telephony_settings: nil,
467
- # Deprecated for new integrations. Inline tool definitions available to the
468
- # assistant. Prefer `tool_ids` to attach shared tools created with the AI Tools
469
- # endpoints.
500
+ # The assistant's tools. Responses merge the assistant's shared Tools Library
501
+ # tools into this array alongside inline tools, each flagged `shared: true`;
502
+ # inline tools carry `shared: false`. On update, a sent `tools` array fully
503
+ # replaces the inline tools only — shared tools stay attached unless `tool_ids`
504
+ # changes. Each tool type except `function`, `webhook`, and `client_side_tool`
505
+ # allows at most one instance per assistant across both sources.
470
506
  tools: nil,
471
507
  transcription: nil,
472
508
  # Timestamp when this assistant version was created.
@@ -490,6 +526,7 @@ module Telnyx
490
526
  instructions: String,
491
527
  model: String,
492
528
  name: String,
529
+ a2a_agents: T::Array[Telnyx::AI::AssistantA2AAgent],
493
530
  conversation_flow: Telnyx::AI::ConversationFlow,
494
531
  description: String,
495
532
  dynamic_variables: T::Hash[Symbol, T.anything],