telnyx 5.68.1 → 5.69.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 (117) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +39 -0
  3. data/README.md +1 -1
  4. data/lib/telnyx/client.rb +7 -0
  5. data/lib/telnyx/internal/util.rb +18 -4
  6. data/lib/telnyx/lib/webhook_verification.rb +1 -0
  7. data/lib/telnyx/lib/webhook_verification_error.rb +27 -0
  8. data/lib/telnyx/lib/webhooks_ed25519.rb +50 -0
  9. data/lib/telnyx/models/ai/assistant_create_params.rb +47 -1
  10. data/lib/telnyx/models/ai/assistant_tool.rb +25 -5
  11. data/lib/telnyx/models/ai/assistant_update_params.rb +47 -1
  12. data/lib/telnyx/models/ai/assistants/update_assistant.rb +48 -1
  13. data/lib/telnyx/models/ai/audio_transcribe_response.rb +70 -7
  14. data/lib/telnyx/models/ai/inference_embedding.rb +48 -1
  15. data/lib/telnyx/models/ai/telephony_settings.rb +13 -1
  16. data/lib/telnyx/models/pronunciation_dict_create_params.rb +141 -0
  17. data/lib/telnyx/models/pronunciation_dict_create_response.rb +207 -0
  18. data/lib/telnyx/models/pronunciation_dict_delete_params.rb +20 -0
  19. data/lib/telnyx/models/pronunciation_dict_list_params.rb +30 -0
  20. data/lib/telnyx/models/pronunciation_dict_list_response.rb +190 -0
  21. data/lib/telnyx/models/pronunciation_dict_retrieve_params.rb +20 -0
  22. data/lib/telnyx/models/pronunciation_dict_retrieve_response.rb +207 -0
  23. data/lib/telnyx/models/pronunciation_dict_update_params.rb +144 -0
  24. data/lib/telnyx/models/pronunciation_dict_update_response.rb +207 -0
  25. data/lib/telnyx/models/texml/accounts/call_calls_params.rb +1893 -547
  26. data/lib/telnyx/models/texml_initiate_ai_call_params.rb +514 -0
  27. data/lib/telnyx/models/texml_initiate_ai_call_response.rb +34 -0
  28. data/lib/telnyx/models/verification.rb +1 -0
  29. data/lib/telnyx/models/verification_trigger_whatsapp_verification_params.rb +46 -0
  30. data/lib/telnyx/models/verify_profile_create_params.rb +43 -1
  31. data/lib/telnyx/models/verify_profile_update_params.rb +43 -1
  32. data/lib/telnyx/models/whatsapp_message_content.rb +196 -1
  33. data/lib/telnyx/models/wireless_blocklist_update_params.rb +8 -21
  34. data/lib/telnyx/models.rb +15 -0
  35. data/lib/telnyx/resources/ai/assistants/versions.rb +3 -1
  36. data/lib/telnyx/resources/ai/assistants.rb +6 -2
  37. data/lib/telnyx/resources/pronunciation_dicts.rb +156 -0
  38. data/lib/telnyx/resources/texml/accounts/calls.rb +3 -84
  39. data/lib/telnyx/resources/texml.rb +106 -0
  40. data/lib/telnyx/resources/verifications.rb +28 -0
  41. data/lib/telnyx/resources/verify_profiles.rb +5 -2
  42. data/lib/telnyx/resources/wireless_blocklists.rb +5 -5
  43. data/lib/telnyx/version.rb +1 -1
  44. data/lib/telnyx.rb +13 -0
  45. data/rbi/telnyx/client.rbi +6 -0
  46. data/rbi/telnyx/internal/util.rbi +8 -0
  47. data/rbi/telnyx/models/ai/assistant_create_params.rbi +130 -0
  48. data/rbi/telnyx/models/ai/assistant_tool.rbi +56 -5
  49. data/rbi/telnyx/models/ai/assistant_update_params.rbi +130 -0
  50. data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +132 -0
  51. data/rbi/telnyx/models/ai/audio_transcribe_response.rbi +123 -10
  52. data/rbi/telnyx/models/ai/inference_embedding.rbi +130 -0
  53. data/rbi/telnyx/models/ai/telephony_settings.rbi +13 -0
  54. data/rbi/telnyx/models/pronunciation_dict_create_params.rbi +246 -0
  55. data/rbi/telnyx/models/pronunciation_dict_create_response.rbi +398 -0
  56. data/rbi/telnyx/models/pronunciation_dict_delete_params.rbi +38 -0
  57. data/rbi/telnyx/models/pronunciation_dict_list_params.rbi +57 -0
  58. data/rbi/telnyx/models/pronunciation_dict_list_response.rbi +353 -0
  59. data/rbi/telnyx/models/pronunciation_dict_retrieve_params.rbi +38 -0
  60. data/rbi/telnyx/models/pronunciation_dict_retrieve_response.rbi +398 -0
  61. data/rbi/telnyx/models/pronunciation_dict_update_params.rbi +268 -0
  62. data/rbi/telnyx/models/pronunciation_dict_update_response.rbi +398 -0
  63. data/rbi/telnyx/models/texml/accounts/call_calls_params.rbi +3719 -1011
  64. data/rbi/telnyx/models/texml_initiate_ai_call_params.rbi +1010 -0
  65. data/rbi/telnyx/models/texml_initiate_ai_call_response.rbi +58 -0
  66. data/rbi/telnyx/models/verification.rbi +1 -0
  67. data/rbi/telnyx/models/verification_trigger_whatsapp_verification_params.rbi +73 -0
  68. data/rbi/telnyx/models/verify_profile_create_params.rbi +85 -0
  69. data/rbi/telnyx/models/verify_profile_update_params.rbi +85 -0
  70. data/rbi/telnyx/models/whatsapp_message_content.rbi +492 -0
  71. data/rbi/telnyx/models/wireless_blocklist_update_params.rbi +6 -49
  72. data/rbi/telnyx/models.rbi +19 -10
  73. data/rbi/telnyx/resources/ai/assistants/versions.rbi +4 -0
  74. data/rbi/telnyx/resources/ai/assistants.rbi +6 -0
  75. data/rbi/telnyx/resources/pronunciation_dicts.rbi +131 -0
  76. data/rbi/telnyx/resources/texml/accounts/calls.rbi +7 -163
  77. data/rbi/telnyx/resources/texml.rbi +164 -0
  78. data/rbi/telnyx/resources/verifications.rbi +23 -0
  79. data/rbi/telnyx/resources/verify_profiles.rbi +4 -0
  80. data/rbi/telnyx/resources/wireless_blocklists.rbi +3 -3
  81. data/sig/telnyx/client.rbs +2 -0
  82. data/sig/telnyx/internal/util.rbs +4 -0
  83. data/sig/telnyx/models/ai/assistant_create_params.rbs +62 -0
  84. data/sig/telnyx/models/ai/assistant_tool.rbs +17 -4
  85. data/sig/telnyx/models/ai/assistant_update_params.rbs +62 -0
  86. data/sig/telnyx/models/ai/assistants/update_assistant.rbs +62 -0
  87. data/sig/telnyx/models/ai/audio_transcribe_response.rbs +53 -3
  88. data/sig/telnyx/models/ai/inference_embedding.rbs +62 -0
  89. data/sig/telnyx/models/ai/telephony_settings.rbs +7 -0
  90. data/sig/telnyx/models/pronunciation_dict_create_params.rbs +97 -0
  91. data/sig/telnyx/models/pronunciation_dict_create_response.rbs +167 -0
  92. data/sig/telnyx/models/pronunciation_dict_delete_params.rbs +20 -0
  93. data/sig/telnyx/models/pronunciation_dict_list_params.rbs +32 -0
  94. data/sig/telnyx/models/pronunciation_dict_list_response.rbs +144 -0
  95. data/sig/telnyx/models/pronunciation_dict_retrieve_params.rbs +20 -0
  96. data/sig/telnyx/models/pronunciation_dict_retrieve_response.rbs +167 -0
  97. data/sig/telnyx/models/pronunciation_dict_update_params.rbs +108 -0
  98. data/sig/telnyx/models/pronunciation_dict_update_response.rbs +167 -0
  99. data/sig/telnyx/models/texml/accounts/call_calls_params.rbs +1368 -331
  100. data/sig/telnyx/models/texml_initiate_ai_call_params.rbs +444 -0
  101. data/sig/telnyx/models/texml_initiate_ai_call_response.rbs +38 -0
  102. data/sig/telnyx/models/verification.rbs +2 -1
  103. data/sig/telnyx/models/verification_trigger_whatsapp_verification_params.rbs +43 -0
  104. data/sig/telnyx/models/verify_profile_create_params.rbs +43 -1
  105. data/sig/telnyx/models/verify_profile_update_params.rbs +43 -1
  106. data/sig/telnyx/models/whatsapp_message_content.rbs +205 -0
  107. data/sig/telnyx/models/wireless_blocklist_update_params.rbs +5 -25
  108. data/sig/telnyx/models.rbs +14 -0
  109. data/sig/telnyx/resources/ai/assistants/versions.rbs +1 -0
  110. data/sig/telnyx/resources/ai/assistants.rbs +2 -0
  111. data/sig/telnyx/resources/pronunciation_dicts.rbs +33 -0
  112. data/sig/telnyx/resources/texml/accounts/calls.rbs +1 -40
  113. data/sig/telnyx/resources/texml.rbs +44 -0
  114. data/sig/telnyx/resources/verifications.rbs +8 -0
  115. data/sig/telnyx/resources/verify_profiles.rbs +2 -0
  116. data/sig/telnyx/resources/wireless_blocklists.rbs +1 -1
  117. metadata +43 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f34b351e46a139b2d8217472217b09e421a8d04aee53e3597ab260cb8e6ab9cc
4
- data.tar.gz: 17836f25c4cbcdab85c8c6c093806b0772eb3f4b036fed47804e702fb603a6a1
3
+ metadata.gz: 1acb28734cb5b652f6aa6cd7242b7bd6b89cfd0c41e044a16946a607b8797d52
4
+ data.tar.gz: 8202e48caa11f4357ab68b9f605ceddc3083989cb5c6eaff943655c87ab85401
5
5
  SHA512:
6
- metadata.gz: f83976ff044d8e994a43a5fe1a3f5f38367e427f91bb3918c892025967c40eeba308d751a961a2006f41c6e39d920a2e77701ba65ad45b0b5534bb274ac6c869
7
- data.tar.gz: 8251c6427f0ba4b6c5a244558157315163f08c943848d943e377e2cb40885fd55da15a36fd7f3aa09df191ada92912b0ff3713959f8de5e4760465b03c99aa3d
6
+ metadata.gz: 0f98808e691b61e96aaa0fe8395c80d8b6d262287d186b5a9603aa8f3b6cda92b0dd2f0333470d1e4e2ab9b98099c03121ab7050e8ed0e53ce2575ba8d5a18cb
7
+ data.tar.gz: 5ba5fa1a40066e1c73e848ed539b3955be3ee6b08d1976198f6899ec76de14153558b5a87b371d62f3e1657eba26d9caf1eee9eef52fa808eca5f7698405ab91
data/CHANGELOG.md CHANGED
@@ -1,5 +1,44 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.69.0 (2026-04-08)
4
+
5
+ Full Changelog: [v5.68.2...v5.69.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.68.2...v5.69.0)
6
+
7
+ ### Features
8
+
9
+ * Add ai_calls endpoint documentation to OpenAPI spec ([c8acb50](https://github.com/team-telnyx/telnyx-ruby/commit/c8acb50e7e89bba2f6314fe1ad3a81547a172f63))
10
+ * add enabled boolean to recording_settings [AI-2178] ([8f21b10](https://github.com/team-telnyx/telnyx-ruby/commit/8f21b10753325c2792b0aabecd97633c51b410a0))
11
+ * Add oneOf constraint for Url/Texml mutual exclusivity in InitiateCallRequest ([5cd6954](https://github.com/team-telnyx/telnyx-ruby/commit/5cd6954637cf297313fb31668c82424e959ecb27))
12
+ * AI-2180: Add message_template to SendMessageTool schema ([6dcb74b](https://github.com/team-telnyx/telnyx-ruby/commit/6dcb74b30bc33245d83809f5f5e05a3a27ca13aa))
13
+ * **api:** manual updates ([4933749](https://github.com/team-telnyx/telnyx-ruby/commit/4933749dbde30b5ad5ec3d3914d49cf071367662))
14
+ * **api:** Merge pull request [#39](https://github.com/team-telnyx/telnyx-ruby/issues/39) from stainless-sdks/revert-a988c49-stainless-changes ([2286831](https://github.com/team-telnyx/telnyx-ruby/commit/2286831469bf7527df9b5caa6d57f788744e66b2))
15
+ * Assistants: add observability ([88c203f](https://github.com/team-telnyx/telnyx-ruby/commit/88c203faad93be1670c56ed331dfc6816b562ed9))
16
+ * CW-3815 fix PATCH /wirelss_blocklists/{id} endpoint ([4cf00e9](https://github.com/team-telnyx/telnyx-ruby/commit/4cf00e94bb333207285db020723792bddf3c6b2d))
17
+ * MSG-6666: Add template and text properties to WhatsApp send message schema ([7dac0d6](https://github.com/team-telnyx/telnyx-ruby/commit/7dac0d6aca0d853ec56309dd3fdca67a204f3446))
18
+ * MSG-6673: Add WhatsApp verification endpoint and profile settings ([00f25ab](https://github.com/team-telnyx/telnyx-ruby/commit/00f25abe49dca4f75852119df52da915567bd459))
19
+ * TELAPPS-5689: Pronunciation dictionaries API docs ([716d0a0](https://github.com/team-telnyx/telnyx-ruby/commit/716d0a0d2d7973b998902932f7b9d0965acc8ee9))
20
+
21
+
22
+ ### Bug Fixes
23
+
24
+ * add missing VoiceCloneCreateFromDesignParams and VoiceCloneCreateFromDesignResponse constant aliases ([1cef321](https://github.com/team-telnyx/telnyx-ruby/commit/1cef3216c8b5a0ac54db0f919df8ac305f154e86))
25
+ * align path encoding with RFC 3986 section 3.3 ([cb36e56](https://github.com/team-telnyx/telnyx-ruby/commit/cb36e56e938d6fd5498f860d29c788644bb4d753))
26
+ * variable name typo ([49b527d](https://github.com/team-telnyx/telnyx-ruby/commit/49b527df7eed567656f1d149cb4c9af3d9b29693))
27
+
28
+
29
+ ### Reverts
30
+
31
+ * restore stainless.yml SDK generation fixes ([2286831](https://github.com/team-telnyx/telnyx-ruby/commit/2286831469bf7527df9b5caa6d57f788744e66b2))
32
+
33
+
34
+ ### Chores
35
+
36
+ * remove legacy GEM_HOST_API_KEY check (now using OIDC) ([b20bdd2](https://github.com/team-telnyx/telnyx-ruby/commit/b20bdd2ac232901e0e0106575afa8c470b5feb9b))
37
+
38
+ ## 5.68.2 (2026-03-31)
39
+
40
+ Full Changelog: [v5.68.1...v5.68.2](https://github.com/team-telnyx/telnyx-ruby/compare/v5.68.1...v5.68.2)
41
+
3
42
  ## 5.68.1 (2026-03-31)
4
43
 
5
44
  Full Changelog: [v5.68.0...v5.68.1](https://github.com/team-telnyx/telnyx-ruby/compare/v5.68.0...v5.68.1)
data/README.md CHANGED
@@ -24,7 +24,7 @@ To use this gem, install via Bundler by adding the following to your application
24
24
  <!-- x-release-please-start-version -->
25
25
 
26
26
  ```ruby
27
- gem "telnyx", "~> 5.68.1"
27
+ gem "telnyx", "~> 5.69.0"
28
28
  ```
29
29
 
30
30
  <!-- x-release-please-end -->
data/lib/telnyx/client.rb CHANGED
@@ -653,6 +653,12 @@ module Telnyx
653
653
  # @return [Telnyx::Resources::TermsOfService]
654
654
  attr_reader :terms_of_service
655
655
 
656
+ # Manage pronunciation dictionaries for text-to-speech synthesis. Dictionaries
657
+ # contain alias items (text replacement) and phoneme items (IPA pronunciation
658
+ # notation) that control how specific words are spoken.
659
+ # @return [Telnyx::Resources::PronunciationDicts]
660
+ attr_reader :pronunciation_dicts
661
+
656
662
  # @api private
657
663
  #
658
664
  # @return [Hash{String=>String}]
@@ -910,6 +916,7 @@ module Telnyx
910
916
  @enterprises = Telnyx::Resources::Enterprises.new(client: self)
911
917
  @reputation = Telnyx::Resources::Reputation.new(client: self)
912
918
  @terms_of_service = Telnyx::Resources::TermsOfService.new(client: self)
919
+ @pronunciation_dicts = Telnyx::Resources::PronunciationDicts.new(client: self)
913
920
  end
914
921
  end
915
922
  end
@@ -157,7 +157,7 @@ module Telnyx
157
157
  in Hash | nil => coerced
158
158
  coerced
159
159
  else
160
- message = "Expected a #{Hash} or #{Telnyx::Internal::Type::BaseModel}, got #{data.inspect}"
160
+ message = "Expected a #{Hash} or #{Telnyx::Internal::Type::BaseModel}, got #{input.inspect}"
161
161
  raise ArgumentError.new(message)
162
162
  end
163
163
  end
@@ -237,6 +237,11 @@ module Telnyx
237
237
  end
238
238
  end
239
239
 
240
+ # @type [Regexp]
241
+ #
242
+ # https://www.rfc-editor.org/rfc/rfc3986.html#section-3.3
243
+ RFC_3986_NOT_PCHARS = /[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/
244
+
240
245
  class << self
241
246
  # @api private
242
247
  #
@@ -247,6 +252,15 @@ module Telnyx
247
252
  "#{uri.scheme}://#{uri.host}#{":#{uri.port}" unless uri.port == uri.default_port}"
248
253
  end
249
254
 
255
+ # @api private
256
+ #
257
+ # @param path [String, Integer]
258
+ #
259
+ # @return [String]
260
+ def encode_path(path)
261
+ path.to_s.gsub(Telnyx::Internal::Util::RFC_3986_NOT_PCHARS) { ERB::Util.url_encode(_1) }
262
+ end
263
+
250
264
  # @api private
251
265
  #
252
266
  # @param path [String, Array<String>]
@@ -259,7 +273,7 @@ module Telnyx
259
273
  in []
260
274
  ""
261
275
  in [String => p, *interpolations]
262
- encoded = interpolations.map { ERB::Util.url_encode(_1) }
276
+ encoded = interpolations.map { encode_path(_1) }
263
277
  format(p, *encoded)
264
278
  end
265
279
  end
@@ -576,10 +590,10 @@ module Telnyx
576
590
 
577
591
  case val
578
592
  in Telnyx::FilePart unless val.filename.nil?
579
- filename = ERB::Util.url_encode(val.filename)
593
+ filename = encode_path(val.filename)
580
594
  y << "; filename=\"#{filename}\""
581
595
  in Pathname | IO
582
- filename = ERB::Util.url_encode(::File.basename(val.to_path))
596
+ filename = encode_path(::File.basename(val.to_path))
583
597
  y << "; filename=\"#{filename}\""
584
598
  else
585
599
  end
@@ -2,6 +2,7 @@
2
2
 
3
3
  require "base64"
4
4
  require "openssl"
5
+ require_relative "webhook_verification_error"
5
6
 
6
7
  module Telnyx
7
8
  module Lib
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Errors
5
+ # Error raised when webhook signature verification fails.
6
+ #
7
+ # This error is raised by the webhook verification module when:
8
+ # - No public key is configured
9
+ # - Required headers are missing (telnyx-signature-ed25519, telnyx-timestamp)
10
+ # - Timestamp is too old or too new (outside 5-minute tolerance)
11
+ # - Signature verification fails
12
+ # - Public key or signature format is invalid
13
+ #
14
+ # @example Handling verification errors
15
+ # begin
16
+ # client.webhooks.verify!(payload, headers)
17
+ # rescue Telnyx::Errors::WebhookVerificationError => e
18
+ # puts "Webhook verification failed: #{e.message}"
19
+ # end
20
+ class WebhookVerificationError < StandardError
21
+ # @param message [String] The error message describing the verification failure
22
+ def initialize(message:)
23
+ super(message)
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,50 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "webhook_verification"
4
+ require_relative "webhook_verification_error"
5
+
6
+ module Telnyx
7
+ module Resources
8
+ # Extends the generated Webhooks class with ED25519 signature verification.
9
+ #
10
+ # This reopens the Webhooks class to include the WebhookVerification module,
11
+ # which adds ED25519 signature verification matching Python, Node, Go, and Java SDKs.
12
+ #
13
+ # Usage:
14
+ #
15
+ # require "telnyx"
16
+ # require "telnyx/lib/webhooks_ed25519"
17
+ #
18
+ # client = Telnyx::Client.new(
19
+ # api_key: ENV["TELNYX_API_KEY"],
20
+ # public_key: ENV["TELNYX_PUBLIC_KEY"] # Base64 from Mission Control
21
+ # )
22
+ #
23
+ # # Verify signature only (raises WebhookVerificationError on failure)
24
+ # client.webhooks.verify!(payload, headers)
25
+ #
26
+ # # Verify and parse (ED25519 verification, then parse)
27
+ # event = client.webhooks.unwrap(payload, headers: headers)
28
+ #
29
+ class Webhooks
30
+ include Telnyx::Lib::WebhookVerification
31
+
32
+ # Override unwrap to use ED25519 verification instead of StandardWebhooks.
33
+ #
34
+ # @param payload [String] The raw webhook payload as a string
35
+ # @param headers [Hash{String=>String}] The raw HTTP headers
36
+ # @param key [String, nil] Optional public key override (base64-encoded ED25519)
37
+ #
38
+ # @return [Telnyx::Models::UnwrapWebhookEvent]
39
+ # @raise [Telnyx::Errors::WebhookVerificationError] If verification fails
40
+ def unwrap(payload, headers:, key: nil)
41
+ # Use ED25519 verification
42
+ do_verify_signature(payload, headers, key || @client.public_key)
43
+
44
+ # Parse the payload
45
+ parsed = JSON.parse(payload, symbolize_names: true)
46
+ Telnyx::Internal::Type::Converter.coerce(Telnyx::Models::UnwrapWebhookEvent, parsed)
47
+ end
48
+ end
49
+ end
50
+ end
@@ -84,6 +84,11 @@ module Telnyx
84
84
  # @return [Telnyx::Models::AI::MessagingSettings, nil]
85
85
  optional :messaging_settings, -> { Telnyx::AI::MessagingSettings }
86
86
 
87
+ # @!attribute observability_settings
88
+ #
89
+ # @return [Telnyx::Models::AI::AssistantCreateParams::ObservabilitySettings, nil]
90
+ optional :observability_settings, -> { Telnyx::AI::AssistantCreateParams::ObservabilitySettings }
91
+
87
92
  # @!attribute privacy_settings
88
93
  #
89
94
  # @return [Telnyx::Models::AI::PrivacySettings, nil]
@@ -122,7 +127,7 @@ module Telnyx
122
127
  # @return [Telnyx::Models::AI::WidgetSettings, nil]
123
128
  optional :widget_settings, -> { Telnyx::AI::WidgetSettings }
124
129
 
125
- # @!method initialize(instructions:, model:, name:, description: nil, dynamic_variables: nil, dynamic_variables_webhook_url: nil, enabled_features: nil, greeting: nil, insight_settings: nil, llm_api_key_ref: nil, messaging_settings: nil, privacy_settings: nil, telephony_settings: nil, tool_ids: nil, tools: nil, transcription: nil, voice_settings: nil, widget_settings: nil, request_options: {})
130
+ # @!method initialize(instructions:, model:, name:, description: nil, dynamic_variables: nil, dynamic_variables_webhook_url: nil, enabled_features: nil, greeting: nil, insight_settings: nil, llm_api_key_ref: nil, messaging_settings: nil, observability_settings: nil, privacy_settings: nil, telephony_settings: nil, tool_ids: nil, tools: nil, transcription: nil, voice_settings: nil, widget_settings: nil, request_options: {})
126
131
  # Some parameter documentations has been truncated, see
127
132
  # {Telnyx::Models::AI::AssistantCreateParams} for more details.
128
133
  #
@@ -148,6 +153,8 @@ module Telnyx
148
153
  #
149
154
  # @param messaging_settings [Telnyx::Models::AI::MessagingSettings]
150
155
  #
156
+ # @param observability_settings [Telnyx::Models::AI::AssistantCreateParams::ObservabilitySettings]
157
+ #
151
158
  # @param privacy_settings [Telnyx::Models::AI::PrivacySettings]
152
159
  #
153
160
  # @param telephony_settings [Telnyx::Models::AI::TelephonySettings]
@@ -163,6 +170,45 @@ module Telnyx
163
170
  # @param widget_settings [Telnyx::Models::AI::WidgetSettings] Configuration settings for the assistant's web widget.
164
171
  #
165
172
  # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}]
173
+
174
+ class ObservabilitySettings < Telnyx::Internal::Type::BaseModel
175
+ # @!attribute host
176
+ #
177
+ # @return [String, nil]
178
+ optional :host, String
179
+
180
+ # @!attribute public_key_ref
181
+ #
182
+ # @return [String, nil]
183
+ optional :public_key_ref, String
184
+
185
+ # @!attribute secret_key_ref
186
+ #
187
+ # @return [String, nil]
188
+ optional :secret_key_ref, String
189
+
190
+ # @!attribute status
191
+ #
192
+ # @return [Symbol, Telnyx::Models::AI::AssistantCreateParams::ObservabilitySettings::Status, nil]
193
+ optional :status, enum: -> { Telnyx::AI::AssistantCreateParams::ObservabilitySettings::Status }
194
+
195
+ # @!method initialize(host: nil, public_key_ref: nil, secret_key_ref: nil, status: nil)
196
+ # @param host [String]
197
+ # @param public_key_ref [String]
198
+ # @param secret_key_ref [String]
199
+ # @param status [Symbol, Telnyx::Models::AI::AssistantCreateParams::ObservabilitySettings::Status]
200
+
201
+ # @see Telnyx::Models::AI::AssistantCreateParams::ObservabilitySettings#status
202
+ module Status
203
+ extend Telnyx::Internal::Type::Enum
204
+
205
+ ENABLED = :enabled
206
+ DISABLED = :disabled
207
+
208
+ # @!method self.values
209
+ # @return [Array<Symbol>]
210
+ end
211
+ end
166
212
  end
167
213
  end
168
214
  end
@@ -28,7 +28,7 @@ module Telnyx
28
28
 
29
29
  variant :send_dtmf, -> { Telnyx::AI::AssistantTool::SendDtmf }
30
30
 
31
- # The send_message tool allows the assistant to send SMS or MMS messages to the end user. The 'to' and 'from' addresses are automatically determined from the conversation context, and the message text is generated by the assistant.
31
+ # The send_message tool allows the assistant to send SMS or MMS messages to the end user. The 'to' and 'from' addresses are automatically determined from the conversation context, and the message text is generated by the assistant unless a message_template is provided for runtime variable substitution.
32
32
  variant :send_message, -> { Telnyx::AI::AssistantTool::SendMessage }
33
33
 
34
34
  variant :skip_turn, -> { Telnyx::AI::AssistantTool::SkipTurn }
@@ -792,8 +792,8 @@ module Telnyx
792
792
  class SendMessage < Telnyx::Internal::Type::BaseModel
793
793
  # @!attribute send_message
794
794
  #
795
- # @return [Hash{Symbol=>Object}]
796
- required :send_message, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
795
+ # @return [Telnyx::Models::AI::AssistantTool::SendMessage::SendMessage]
796
+ required :send_message, -> { Telnyx::AI::AssistantTool::SendMessage::SendMessage }
797
797
 
798
798
  # @!attribute type
799
799
  #
@@ -803,10 +803,30 @@ module Telnyx
803
803
  # @!method initialize(send_message:, type: :send_message)
804
804
  # The send_message tool allows the assistant to send SMS or MMS messages to the
805
805
  # end user. The 'to' and 'from' addresses are automatically determined from the
806
- # conversation context, and the message text is generated by the assistant.
806
+ # conversation context, and the message text is generated by the assistant unless
807
+ # a message_template is provided for runtime variable substitution.
807
808
  #
808
- # @param send_message [Hash{Symbol=>Object}]
809
+ # @param send_message [Telnyx::Models::AI::AssistantTool::SendMessage::SendMessage]
809
810
  # @param type [Symbol, :send_message]
811
+
812
+ # @see Telnyx::Models::AI::AssistantTool::SendMessage#send_message
813
+ class SendMessage < Telnyx::Internal::Type::BaseModel
814
+ # @!attribute message_template
815
+ # Optional message template with dynamic variable support using mustache syntax
816
+ # (e.g., {{variable_name}}). When set, the assistant will use this template for
817
+ # the SMS body instead of generating one. Dynamic variables like
818
+ # {{telnyx_end_user_target}}, {{telnyx_agent_target}}, and custom webhook-provided
819
+ # variables will be resolved at runtime.
820
+ #
821
+ # @return [String, nil]
822
+ optional :message_template, String, nil?: true
823
+
824
+ # @!method initialize(message_template: nil)
825
+ # Some parameter documentations has been truncated, see
826
+ # {Telnyx::Models::AI::AssistantTool::SendMessage::SendMessage} for more details.
827
+ #
828
+ # @param message_template [String, nil] Optional message template with dynamic variable support using mustache syntax (e
829
+ end
810
830
  end
811
831
 
812
832
  class SkipTurn < Telnyx::Internal::Type::BaseModel
@@ -89,6 +89,11 @@ module Telnyx
89
89
  # @return [String, nil]
90
90
  optional :name, String
91
91
 
92
+ # @!attribute observability_settings
93
+ #
94
+ # @return [Telnyx::Models::AI::AssistantUpdateParams::ObservabilitySettings, nil]
95
+ optional :observability_settings, -> { Telnyx::AI::AssistantUpdateParams::ObservabilitySettings }
96
+
92
97
  # @!attribute privacy_settings
93
98
  #
94
99
  # @return [Telnyx::Models::AI::PrivacySettings, nil]
@@ -134,7 +139,7 @@ module Telnyx
134
139
  # @return [Telnyx::Models::AI::WidgetSettings, nil]
135
140
  optional :widget_settings, -> { Telnyx::AI::WidgetSettings }
136
141
 
137
- # @!method initialize(assistant_id:, description: nil, dynamic_variables: nil, dynamic_variables_webhook_url: nil, enabled_features: nil, greeting: nil, insight_settings: nil, instructions: nil, llm_api_key_ref: nil, messaging_settings: nil, model: nil, name: nil, privacy_settings: nil, promote_to_main: nil, telephony_settings: nil, tool_ids: nil, tools: nil, transcription: nil, voice_settings: nil, widget_settings: nil, request_options: {})
142
+ # @!method initialize(assistant_id:, description: nil, dynamic_variables: nil, dynamic_variables_webhook_url: nil, enabled_features: nil, greeting: nil, insight_settings: nil, instructions: nil, llm_api_key_ref: nil, messaging_settings: nil, model: nil, name: nil, observability_settings: nil, privacy_settings: nil, promote_to_main: nil, telephony_settings: nil, tool_ids: nil, tools: nil, transcription: nil, voice_settings: nil, widget_settings: nil, request_options: {})
138
143
  # Some parameter documentations has been truncated, see
139
144
  # {Telnyx::Models::AI::AssistantUpdateParams} for more details.
140
145
  #
@@ -162,6 +167,8 @@ module Telnyx
162
167
  #
163
168
  # @param name [String]
164
169
  #
170
+ # @param observability_settings [Telnyx::Models::AI::AssistantUpdateParams::ObservabilitySettings]
171
+ #
165
172
  # @param privacy_settings [Telnyx::Models::AI::PrivacySettings]
166
173
  #
167
174
  # @param promote_to_main [Boolean] Indicates whether the assistant should be promoted to the main version. Defaults
@@ -179,6 +186,45 @@ module Telnyx
179
186
  # @param widget_settings [Telnyx::Models::AI::WidgetSettings] Configuration settings for the assistant's web widget.
180
187
  #
181
188
  # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}]
189
+
190
+ class ObservabilitySettings < Telnyx::Internal::Type::BaseModel
191
+ # @!attribute host
192
+ #
193
+ # @return [String, nil]
194
+ optional :host, String
195
+
196
+ # @!attribute public_key_ref
197
+ #
198
+ # @return [String, nil]
199
+ optional :public_key_ref, String
200
+
201
+ # @!attribute secret_key_ref
202
+ #
203
+ # @return [String, nil]
204
+ optional :secret_key_ref, String
205
+
206
+ # @!attribute status
207
+ #
208
+ # @return [Symbol, Telnyx::Models::AI::AssistantUpdateParams::ObservabilitySettings::Status, nil]
209
+ optional :status, enum: -> { Telnyx::AI::AssistantUpdateParams::ObservabilitySettings::Status }
210
+
211
+ # @!method initialize(host: nil, public_key_ref: nil, secret_key_ref: nil, status: nil)
212
+ # @param host [String]
213
+ # @param public_key_ref [String]
214
+ # @param secret_key_ref [String]
215
+ # @param status [Symbol, Telnyx::Models::AI::AssistantUpdateParams::ObservabilitySettings::Status]
216
+
217
+ # @see Telnyx::Models::AI::AssistantUpdateParams::ObservabilitySettings#status
218
+ module Status
219
+ extend Telnyx::Internal::Type::Enum
220
+
221
+ ENABLED = :enabled
222
+ DISABLED = :disabled
223
+
224
+ # @!method self.values
225
+ # @return [Array<Symbol>]
226
+ end
227
+ end
182
228
  end
183
229
  end
184
230
  end
@@ -81,6 +81,11 @@ module Telnyx
81
81
  # @return [String, nil]
82
82
  optional :name, String
83
83
 
84
+ # @!attribute observability_settings
85
+ #
86
+ # @return [Telnyx::Models::AI::Assistants::UpdateAssistant::ObservabilitySettings, nil]
87
+ optional :observability_settings, -> { Telnyx::AI::Assistants::UpdateAssistant::ObservabilitySettings }
88
+
84
89
  # @!attribute privacy_settings
85
90
  #
86
91
  # @return [Telnyx::Models::AI::PrivacySettings, nil]
@@ -119,7 +124,7 @@ module Telnyx
119
124
  # @return [Telnyx::Models::AI::WidgetSettings, nil]
120
125
  optional :widget_settings, -> { Telnyx::AI::WidgetSettings }
121
126
 
122
- # @!method initialize(description: nil, dynamic_variables: nil, dynamic_variables_webhook_url: nil, enabled_features: nil, greeting: nil, insight_settings: nil, instructions: nil, llm_api_key_ref: nil, messaging_settings: nil, model: nil, name: nil, privacy_settings: nil, telephony_settings: nil, tool_ids: nil, tools: nil, transcription: nil, voice_settings: nil, widget_settings: nil)
127
+ # @!method initialize(description: nil, dynamic_variables: nil, dynamic_variables_webhook_url: nil, enabled_features: nil, greeting: nil, insight_settings: nil, instructions: nil, llm_api_key_ref: nil, messaging_settings: nil, model: nil, name: nil, observability_settings: nil, privacy_settings: nil, telephony_settings: nil, tool_ids: nil, tools: nil, transcription: nil, voice_settings: nil, widget_settings: nil)
123
128
  # Some parameter documentations has been truncated, see
124
129
  # {Telnyx::Models::AI::Assistants::UpdateAssistant} for more details.
125
130
  #
@@ -145,6 +150,8 @@ module Telnyx
145
150
  #
146
151
  # @param name [String]
147
152
  #
153
+ # @param observability_settings [Telnyx::Models::AI::Assistants::UpdateAssistant::ObservabilitySettings]
154
+ #
148
155
  # @param privacy_settings [Telnyx::Models::AI::PrivacySettings]
149
156
  #
150
157
  # @param telephony_settings [Telnyx::Models::AI::TelephonySettings]
@@ -158,6 +165,46 @@ module Telnyx
158
165
  # @param voice_settings [Telnyx::Models::AI::VoiceSettings]
159
166
  #
160
167
  # @param widget_settings [Telnyx::Models::AI::WidgetSettings] Configuration settings for the assistant's web widget.
168
+
169
+ # @see Telnyx::Models::AI::Assistants::UpdateAssistant#observability_settings
170
+ class ObservabilitySettings < Telnyx::Internal::Type::BaseModel
171
+ # @!attribute host
172
+ #
173
+ # @return [String, nil]
174
+ optional :host, String
175
+
176
+ # @!attribute public_key_ref
177
+ #
178
+ # @return [String, nil]
179
+ optional :public_key_ref, String
180
+
181
+ # @!attribute secret_key_ref
182
+ #
183
+ # @return [String, nil]
184
+ optional :secret_key_ref, String
185
+
186
+ # @!attribute status
187
+ #
188
+ # @return [Symbol, Telnyx::Models::AI::Assistants::UpdateAssistant::ObservabilitySettings::Status, nil]
189
+ optional :status, enum: -> { Telnyx::AI::Assistants::UpdateAssistant::ObservabilitySettings::Status }
190
+
191
+ # @!method initialize(host: nil, public_key_ref: nil, secret_key_ref: nil, status: nil)
192
+ # @param host [String]
193
+ # @param public_key_ref [String]
194
+ # @param secret_key_ref [String]
195
+ # @param status [Symbol, Telnyx::Models::AI::Assistants::UpdateAssistant::ObservabilitySettings::Status]
196
+
197
+ # @see Telnyx::Models::AI::Assistants::UpdateAssistant::ObservabilitySettings#status
198
+ module Status
199
+ extend Telnyx::Internal::Type::Enum
200
+
201
+ ENABLED = :enabled
202
+ DISABLED = :disabled
203
+
204
+ # @!method self.values
205
+ # @return [Array<Symbol>]
206
+ end
207
+ end
161
208
  end
162
209
  end
163
210
 
@@ -12,29 +12,46 @@ module Telnyx
12
12
  required :text, String
13
13
 
14
14
  # @!attribute duration
15
- # The duration of the audio file in seconds. This is only included if
16
- # `response_format` is set to `verbose_json`.
15
+ # The duration of the audio file in seconds. Returned by
16
+ # `distil-whisper/distil-large-v2` and `deepgram/nova-3` when `response_format` is
17
+ # `verbose_json`. Not returned by `openai/whisper-large-v3-turbo`.
17
18
  #
18
19
  # @return [Float, nil]
19
20
  optional :duration, Float
20
21
 
21
22
  # @!attribute segments
22
- # Segments of the transcribed text and their corresponding details. This is only
23
- # included if `response_format` is set to `verbose_json`.
23
+ # Segments of the transcribed text and their corresponding details. Returned by
24
+ # `distil-whisper/distil-large-v2` when `response_format` is `verbose_json`. Not
25
+ # returned by `openai/whisper-large-v3-turbo`.
24
26
  #
25
27
  # @return [Array<Telnyx::Models::AI::AudioTranscribeResponse::Segment>, nil]
26
28
  optional :segments,
27
29
  -> { Telnyx::Internal::Type::ArrayOf[Telnyx::Models::AI::AudioTranscribeResponse::Segment] }
28
30
 
29
- # @!method initialize(text:, duration: nil, segments: nil)
31
+ # @!attribute words
32
+ # Word-level timestamps and optional speaker labels. Only returned by
33
+ # `deepgram/nova-3` when word-level output is enabled via `model_config`.
34
+ #
35
+ # @return [Array<Telnyx::Models::AI::AudioTranscribeResponse::Word>, nil]
36
+ optional :words, -> { Telnyx::Internal::Type::ArrayOf[Telnyx::Models::AI::AudioTranscribeResponse::Word] }
37
+
38
+ # @!method initialize(text:, duration: nil, segments: nil, words: nil)
30
39
  # Some parameter documentations has been truncated, see
31
40
  # {Telnyx::Models::AI::AudioTranscribeResponse} for more details.
32
41
  #
42
+ # Response fields vary by model. `distil-whisper/distil-large-v2` returns `text`,
43
+ # `duration`, and `segments` in `verbose_json` mode.
44
+ # `openai/whisper-large-v3-turbo` returns `text` only. `deepgram/nova-3` returns
45
+ # `text` and, depending on `model_config`, may include `words` with per-word
46
+ # timestamps and speaker labels.
47
+ #
33
48
  # @param text [String] The transcribed text for the audio file.
34
49
  #
35
- # @param duration [Float] The duration of the audio file in seconds. This is only included if `response_fo
50
+ # @param duration [Float] The duration of the audio file in seconds. Returned by `distil-whisper/distil-la
51
+ #
52
+ # @param segments [Array<Telnyx::Models::AI::AudioTranscribeResponse::Segment>] Segments of the transcribed text and their corresponding details. Returned by `d
36
53
  #
37
- # @param segments [Array<Telnyx::Models::AI::AudioTranscribeResponse::Segment>] Segments of the transcribed text and their corresponding details. This is only i
54
+ # @param words [Array<Telnyx::Models::AI::AudioTranscribeResponse::Word>] Word-level timestamps and optional speaker labels. Only returned by `deepgram/no
38
55
 
39
56
  class Segment < Telnyx::Internal::Type::BaseModel
40
57
  # @!attribute id
@@ -70,6 +87,52 @@ module Telnyx
70
87
  #
71
88
  # @param text [String] Text content of the segment.
72
89
  end
90
+
91
+ class Word < Telnyx::Internal::Type::BaseModel
92
+ # @!attribute end_
93
+ # End time of the word in seconds.
94
+ #
95
+ # @return [Float]
96
+ required :end_, Float, api_name: :end
97
+
98
+ # @!attribute start
99
+ # Start time of the word in seconds.
100
+ #
101
+ # @return [Float]
102
+ required :start, Float
103
+
104
+ # @!attribute word
105
+ # The transcribed word.
106
+ #
107
+ # @return [String]
108
+ required :word, String
109
+
110
+ # @!attribute confidence
111
+ # Confidence score for the word (0.0 to 1.0).
112
+ #
113
+ # @return [Float, nil]
114
+ optional :confidence, Float
115
+
116
+ # @!attribute speaker
117
+ # Speaker index. Only present when diarization is enabled via `model_config`.
118
+ #
119
+ # @return [Integer, nil]
120
+ optional :speaker, Integer
121
+
122
+ # @!method initialize(end_:, start:, word:, confidence: nil, speaker: nil)
123
+ # Word-level timing detail. Only present when using `deepgram/nova-3` with
124
+ # `model_config` options that enable word timestamps.
125
+ #
126
+ # @param end_ [Float] End time of the word in seconds.
127
+ #
128
+ # @param start [Float] Start time of the word in seconds.
129
+ #
130
+ # @param word [String] The transcribed word.
131
+ #
132
+ # @param confidence [Float] Confidence score for the word (0.0 to 1.0).
133
+ #
134
+ # @param speaker [Integer] Speaker index. Only present when diarization is enabled via `model_config`.
135
+ end
73
136
  end
74
137
  end
75
138
  end