telnyx 5.68.2 → 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 (114) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +35 -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/models/ai/assistant_create_params.rb +47 -1
  7. data/lib/telnyx/models/ai/assistant_tool.rb +25 -5
  8. data/lib/telnyx/models/ai/assistant_update_params.rb +47 -1
  9. data/lib/telnyx/models/ai/assistants/update_assistant.rb +48 -1
  10. data/lib/telnyx/models/ai/audio_transcribe_response.rb +70 -7
  11. data/lib/telnyx/models/ai/inference_embedding.rb +48 -1
  12. data/lib/telnyx/models/ai/telephony_settings.rb +13 -1
  13. data/lib/telnyx/models/pronunciation_dict_create_params.rb +141 -0
  14. data/lib/telnyx/models/pronunciation_dict_create_response.rb +207 -0
  15. data/lib/telnyx/models/pronunciation_dict_delete_params.rb +20 -0
  16. data/lib/telnyx/models/pronunciation_dict_list_params.rb +30 -0
  17. data/lib/telnyx/models/pronunciation_dict_list_response.rb +190 -0
  18. data/lib/telnyx/models/pronunciation_dict_retrieve_params.rb +20 -0
  19. data/lib/telnyx/models/pronunciation_dict_retrieve_response.rb +207 -0
  20. data/lib/telnyx/models/pronunciation_dict_update_params.rb +144 -0
  21. data/lib/telnyx/models/pronunciation_dict_update_response.rb +207 -0
  22. data/lib/telnyx/models/texml/accounts/call_calls_params.rb +1893 -547
  23. data/lib/telnyx/models/texml_initiate_ai_call_params.rb +514 -0
  24. data/lib/telnyx/models/texml_initiate_ai_call_response.rb +34 -0
  25. data/lib/telnyx/models/verification.rb +1 -0
  26. data/lib/telnyx/models/verification_trigger_whatsapp_verification_params.rb +46 -0
  27. data/lib/telnyx/models/verify_profile_create_params.rb +43 -1
  28. data/lib/telnyx/models/verify_profile_update_params.rb +43 -1
  29. data/lib/telnyx/models/whatsapp_message_content.rb +196 -1
  30. data/lib/telnyx/models/wireless_blocklist_update_params.rb +8 -21
  31. data/lib/telnyx/models.rb +15 -0
  32. data/lib/telnyx/resources/ai/assistants/versions.rb +3 -1
  33. data/lib/telnyx/resources/ai/assistants.rb +6 -2
  34. data/lib/telnyx/resources/pronunciation_dicts.rb +156 -0
  35. data/lib/telnyx/resources/texml/accounts/calls.rb +3 -84
  36. data/lib/telnyx/resources/texml.rb +106 -0
  37. data/lib/telnyx/resources/verifications.rb +28 -0
  38. data/lib/telnyx/resources/verify_profiles.rb +5 -2
  39. data/lib/telnyx/resources/wireless_blocklists.rb +5 -5
  40. data/lib/telnyx/version.rb +1 -1
  41. data/lib/telnyx.rb +13 -0
  42. data/rbi/telnyx/client.rbi +6 -0
  43. data/rbi/telnyx/internal/util.rbi +8 -0
  44. data/rbi/telnyx/models/ai/assistant_create_params.rbi +130 -0
  45. data/rbi/telnyx/models/ai/assistant_tool.rbi +56 -5
  46. data/rbi/telnyx/models/ai/assistant_update_params.rbi +130 -0
  47. data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +132 -0
  48. data/rbi/telnyx/models/ai/audio_transcribe_response.rbi +123 -10
  49. data/rbi/telnyx/models/ai/inference_embedding.rbi +130 -0
  50. data/rbi/telnyx/models/ai/telephony_settings.rbi +13 -0
  51. data/rbi/telnyx/models/pronunciation_dict_create_params.rbi +246 -0
  52. data/rbi/telnyx/models/pronunciation_dict_create_response.rbi +398 -0
  53. data/rbi/telnyx/models/pronunciation_dict_delete_params.rbi +38 -0
  54. data/rbi/telnyx/models/pronunciation_dict_list_params.rbi +57 -0
  55. data/rbi/telnyx/models/pronunciation_dict_list_response.rbi +353 -0
  56. data/rbi/telnyx/models/pronunciation_dict_retrieve_params.rbi +38 -0
  57. data/rbi/telnyx/models/pronunciation_dict_retrieve_response.rbi +398 -0
  58. data/rbi/telnyx/models/pronunciation_dict_update_params.rbi +268 -0
  59. data/rbi/telnyx/models/pronunciation_dict_update_response.rbi +398 -0
  60. data/rbi/telnyx/models/texml/accounts/call_calls_params.rbi +3719 -1011
  61. data/rbi/telnyx/models/texml_initiate_ai_call_params.rbi +1010 -0
  62. data/rbi/telnyx/models/texml_initiate_ai_call_response.rbi +58 -0
  63. data/rbi/telnyx/models/verification.rbi +1 -0
  64. data/rbi/telnyx/models/verification_trigger_whatsapp_verification_params.rbi +73 -0
  65. data/rbi/telnyx/models/verify_profile_create_params.rbi +85 -0
  66. data/rbi/telnyx/models/verify_profile_update_params.rbi +85 -0
  67. data/rbi/telnyx/models/whatsapp_message_content.rbi +492 -0
  68. data/rbi/telnyx/models/wireless_blocklist_update_params.rbi +6 -49
  69. data/rbi/telnyx/models.rbi +19 -10
  70. data/rbi/telnyx/resources/ai/assistants/versions.rbi +4 -0
  71. data/rbi/telnyx/resources/ai/assistants.rbi +6 -0
  72. data/rbi/telnyx/resources/pronunciation_dicts.rbi +131 -0
  73. data/rbi/telnyx/resources/texml/accounts/calls.rbi +7 -163
  74. data/rbi/telnyx/resources/texml.rbi +164 -0
  75. data/rbi/telnyx/resources/verifications.rbi +23 -0
  76. data/rbi/telnyx/resources/verify_profiles.rbi +4 -0
  77. data/rbi/telnyx/resources/wireless_blocklists.rbi +3 -3
  78. data/sig/telnyx/client.rbs +2 -0
  79. data/sig/telnyx/internal/util.rbs +4 -0
  80. data/sig/telnyx/models/ai/assistant_create_params.rbs +62 -0
  81. data/sig/telnyx/models/ai/assistant_tool.rbs +17 -4
  82. data/sig/telnyx/models/ai/assistant_update_params.rbs +62 -0
  83. data/sig/telnyx/models/ai/assistants/update_assistant.rbs +62 -0
  84. data/sig/telnyx/models/ai/audio_transcribe_response.rbs +53 -3
  85. data/sig/telnyx/models/ai/inference_embedding.rbs +62 -0
  86. data/sig/telnyx/models/ai/telephony_settings.rbs +7 -0
  87. data/sig/telnyx/models/pronunciation_dict_create_params.rbs +97 -0
  88. data/sig/telnyx/models/pronunciation_dict_create_response.rbs +167 -0
  89. data/sig/telnyx/models/pronunciation_dict_delete_params.rbs +20 -0
  90. data/sig/telnyx/models/pronunciation_dict_list_params.rbs +32 -0
  91. data/sig/telnyx/models/pronunciation_dict_list_response.rbs +144 -0
  92. data/sig/telnyx/models/pronunciation_dict_retrieve_params.rbs +20 -0
  93. data/sig/telnyx/models/pronunciation_dict_retrieve_response.rbs +167 -0
  94. data/sig/telnyx/models/pronunciation_dict_update_params.rbs +108 -0
  95. data/sig/telnyx/models/pronunciation_dict_update_response.rbs +167 -0
  96. data/sig/telnyx/models/texml/accounts/call_calls_params.rbs +1368 -331
  97. data/sig/telnyx/models/texml_initiate_ai_call_params.rbs +444 -0
  98. data/sig/telnyx/models/texml_initiate_ai_call_response.rbs +38 -0
  99. data/sig/telnyx/models/verification.rbs +2 -1
  100. data/sig/telnyx/models/verification_trigger_whatsapp_verification_params.rbs +43 -0
  101. data/sig/telnyx/models/verify_profile_create_params.rbs +43 -1
  102. data/sig/telnyx/models/verify_profile_update_params.rbs +43 -1
  103. data/sig/telnyx/models/whatsapp_message_content.rbs +205 -0
  104. data/sig/telnyx/models/wireless_blocklist_update_params.rbs +5 -25
  105. data/sig/telnyx/models.rbs +14 -0
  106. data/sig/telnyx/resources/ai/assistants/versions.rbs +1 -0
  107. data/sig/telnyx/resources/ai/assistants.rbs +2 -0
  108. data/sig/telnyx/resources/pronunciation_dicts.rbs +33 -0
  109. data/sig/telnyx/resources/texml/accounts/calls.rbs +1 -40
  110. data/sig/telnyx/resources/texml.rbs +44 -0
  111. data/sig/telnyx/resources/verifications.rbs +8 -0
  112. data/sig/telnyx/resources/verify_profiles.rbs +2 -0
  113. data/sig/telnyx/resources/wireless_blocklists.rbs +1 -1
  114. metadata +41 -2
@@ -112,6 +112,21 @@ module Telnyx
112
112
  sig { params(name: String).void }
113
113
  attr_writer :name
114
114
 
115
+ sig do
116
+ returns(
117
+ T.nilable(Telnyx::AI::AssistantUpdateParams::ObservabilitySettings)
118
+ )
119
+ end
120
+ attr_reader :observability_settings
121
+
122
+ sig do
123
+ params(
124
+ observability_settings:
125
+ Telnyx::AI::AssistantUpdateParams::ObservabilitySettings::OrHash
126
+ ).void
127
+ end
128
+ attr_writer :observability_settings
129
+
115
130
  sig { returns(T.nilable(Telnyx::AI::PrivacySettings)) }
116
131
  attr_reader :privacy_settings
117
132
 
@@ -222,6 +237,8 @@ module Telnyx
222
237
  messaging_settings: Telnyx::AI::MessagingSettings::OrHash,
223
238
  model: String,
224
239
  name: String,
240
+ observability_settings:
241
+ Telnyx::AI::AssistantUpdateParams::ObservabilitySettings::OrHash,
225
242
  privacy_settings: Telnyx::AI::PrivacySettings::OrHash,
226
243
  promote_to_main: T::Boolean,
227
244
  telephony_settings: Telnyx::AI::TelephonySettings::OrHash,
@@ -281,6 +298,7 @@ module Telnyx
281
298
  # to see all of your available models,
282
299
  model: nil,
283
300
  name: nil,
301
+ observability_settings: nil,
284
302
  privacy_settings: nil,
285
303
  # Indicates whether the assistant should be promoted to the main version. Defaults
286
304
  # to true.
@@ -313,6 +331,8 @@ module Telnyx
313
331
  messaging_settings: Telnyx::AI::MessagingSettings,
314
332
  model: String,
315
333
  name: String,
334
+ observability_settings:
335
+ Telnyx::AI::AssistantUpdateParams::ObservabilitySettings,
316
336
  privacy_settings: Telnyx::AI::PrivacySettings,
317
337
  promote_to_main: T::Boolean,
318
338
  telephony_settings: Telnyx::AI::TelephonySettings,
@@ -341,6 +361,116 @@ module Telnyx
341
361
  end
342
362
  def to_hash
343
363
  end
364
+
365
+ class ObservabilitySettings < Telnyx::Internal::Type::BaseModel
366
+ OrHash =
367
+ T.type_alias do
368
+ T.any(
369
+ Telnyx::AI::AssistantUpdateParams::ObservabilitySettings,
370
+ Telnyx::Internal::AnyHash
371
+ )
372
+ end
373
+
374
+ sig { returns(T.nilable(String)) }
375
+ attr_reader :host
376
+
377
+ sig { params(host: String).void }
378
+ attr_writer :host
379
+
380
+ sig { returns(T.nilable(String)) }
381
+ attr_reader :public_key_ref
382
+
383
+ sig { params(public_key_ref: String).void }
384
+ attr_writer :public_key_ref
385
+
386
+ sig { returns(T.nilable(String)) }
387
+ attr_reader :secret_key_ref
388
+
389
+ sig { params(secret_key_ref: String).void }
390
+ attr_writer :secret_key_ref
391
+
392
+ sig do
393
+ returns(
394
+ T.nilable(
395
+ Telnyx::AI::AssistantUpdateParams::ObservabilitySettings::Status::OrSymbol
396
+ )
397
+ )
398
+ end
399
+ attr_reader :status
400
+
401
+ sig do
402
+ params(
403
+ status:
404
+ Telnyx::AI::AssistantUpdateParams::ObservabilitySettings::Status::OrSymbol
405
+ ).void
406
+ end
407
+ attr_writer :status
408
+
409
+ sig do
410
+ params(
411
+ host: String,
412
+ public_key_ref: String,
413
+ secret_key_ref: String,
414
+ status:
415
+ Telnyx::AI::AssistantUpdateParams::ObservabilitySettings::Status::OrSymbol
416
+ ).returns(T.attached_class)
417
+ end
418
+ def self.new(
419
+ host: nil,
420
+ public_key_ref: nil,
421
+ secret_key_ref: nil,
422
+ status: nil
423
+ )
424
+ end
425
+
426
+ sig do
427
+ override.returns(
428
+ {
429
+ host: String,
430
+ public_key_ref: String,
431
+ secret_key_ref: String,
432
+ status:
433
+ Telnyx::AI::AssistantUpdateParams::ObservabilitySettings::Status::OrSymbol
434
+ }
435
+ )
436
+ end
437
+ def to_hash
438
+ end
439
+
440
+ module Status
441
+ extend Telnyx::Internal::Type::Enum
442
+
443
+ TaggedSymbol =
444
+ T.type_alias do
445
+ T.all(
446
+ Symbol,
447
+ Telnyx::AI::AssistantUpdateParams::ObservabilitySettings::Status
448
+ )
449
+ end
450
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
451
+
452
+ ENABLED =
453
+ T.let(
454
+ :enabled,
455
+ Telnyx::AI::AssistantUpdateParams::ObservabilitySettings::Status::TaggedSymbol
456
+ )
457
+ DISABLED =
458
+ T.let(
459
+ :disabled,
460
+ Telnyx::AI::AssistantUpdateParams::ObservabilitySettings::Status::TaggedSymbol
461
+ )
462
+
463
+ sig do
464
+ override.returns(
465
+ T::Array[
466
+ Telnyx::AI::AssistantUpdateParams::ObservabilitySettings::Status::TaggedSymbol
467
+ ]
468
+ )
469
+ end
470
+ def self.values
471
+ end
472
+ end
473
+ end
344
474
  end
345
475
  end
346
476
  end
@@ -114,6 +114,23 @@ module Telnyx
114
114
  sig { params(name: String).void }
115
115
  attr_writer :name
116
116
 
117
+ sig do
118
+ returns(
119
+ T.nilable(
120
+ Telnyx::AI::Assistants::UpdateAssistant::ObservabilitySettings
121
+ )
122
+ )
123
+ end
124
+ attr_reader :observability_settings
125
+
126
+ sig do
127
+ params(
128
+ observability_settings:
129
+ Telnyx::AI::Assistants::UpdateAssistant::ObservabilitySettings::OrHash
130
+ ).void
131
+ end
132
+ attr_writer :observability_settings
133
+
117
134
  sig { returns(T.nilable(Telnyx::AI::PrivacySettings)) }
118
135
  attr_reader :privacy_settings
119
136
 
@@ -221,6 +238,8 @@ module Telnyx
221
238
  messaging_settings: Telnyx::AI::MessagingSettings::OrHash,
222
239
  model: String,
223
240
  name: String,
241
+ observability_settings:
242
+ Telnyx::AI::Assistants::UpdateAssistant::ObservabilitySettings::OrHash,
224
243
  privacy_settings: Telnyx::AI::PrivacySettings::OrHash,
225
244
  telephony_settings: Telnyx::AI::TelephonySettings::OrHash,
226
245
  tool_ids: T::Array[String],
@@ -277,6 +296,7 @@ module Telnyx
277
296
  # to see all of your available models,
278
297
  model: nil,
279
298
  name: nil,
299
+ observability_settings: nil,
280
300
  privacy_settings: nil,
281
301
  telephony_settings: nil,
282
302
  tool_ids: nil,
@@ -305,6 +325,8 @@ module Telnyx
305
325
  messaging_settings: Telnyx::AI::MessagingSettings,
306
326
  model: String,
307
327
  name: String,
328
+ observability_settings:
329
+ Telnyx::AI::Assistants::UpdateAssistant::ObservabilitySettings,
308
330
  privacy_settings: Telnyx::AI::PrivacySettings,
309
331
  telephony_settings: Telnyx::AI::TelephonySettings,
310
332
  tool_ids: T::Array[String],
@@ -331,6 +353,116 @@ module Telnyx
331
353
  end
332
354
  def to_hash
333
355
  end
356
+
357
+ class ObservabilitySettings < Telnyx::Internal::Type::BaseModel
358
+ OrHash =
359
+ T.type_alias do
360
+ T.any(
361
+ Telnyx::AI::Assistants::UpdateAssistant::ObservabilitySettings,
362
+ Telnyx::Internal::AnyHash
363
+ )
364
+ end
365
+
366
+ sig { returns(T.nilable(String)) }
367
+ attr_reader :host
368
+
369
+ sig { params(host: String).void }
370
+ attr_writer :host
371
+
372
+ sig { returns(T.nilable(String)) }
373
+ attr_reader :public_key_ref
374
+
375
+ sig { params(public_key_ref: String).void }
376
+ attr_writer :public_key_ref
377
+
378
+ sig { returns(T.nilable(String)) }
379
+ attr_reader :secret_key_ref
380
+
381
+ sig { params(secret_key_ref: String).void }
382
+ attr_writer :secret_key_ref
383
+
384
+ sig do
385
+ returns(
386
+ T.nilable(
387
+ Telnyx::AI::Assistants::UpdateAssistant::ObservabilitySettings::Status::OrSymbol
388
+ )
389
+ )
390
+ end
391
+ attr_reader :status
392
+
393
+ sig do
394
+ params(
395
+ status:
396
+ Telnyx::AI::Assistants::UpdateAssistant::ObservabilitySettings::Status::OrSymbol
397
+ ).void
398
+ end
399
+ attr_writer :status
400
+
401
+ sig do
402
+ params(
403
+ host: String,
404
+ public_key_ref: String,
405
+ secret_key_ref: String,
406
+ status:
407
+ Telnyx::AI::Assistants::UpdateAssistant::ObservabilitySettings::Status::OrSymbol
408
+ ).returns(T.attached_class)
409
+ end
410
+ def self.new(
411
+ host: nil,
412
+ public_key_ref: nil,
413
+ secret_key_ref: nil,
414
+ status: nil
415
+ )
416
+ end
417
+
418
+ sig do
419
+ override.returns(
420
+ {
421
+ host: String,
422
+ public_key_ref: String,
423
+ secret_key_ref: String,
424
+ status:
425
+ Telnyx::AI::Assistants::UpdateAssistant::ObservabilitySettings::Status::OrSymbol
426
+ }
427
+ )
428
+ end
429
+ def to_hash
430
+ end
431
+
432
+ module Status
433
+ extend Telnyx::Internal::Type::Enum
434
+
435
+ TaggedSymbol =
436
+ T.type_alias do
437
+ T.all(
438
+ Symbol,
439
+ Telnyx::AI::Assistants::UpdateAssistant::ObservabilitySettings::Status
440
+ )
441
+ end
442
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
443
+
444
+ ENABLED =
445
+ T.let(
446
+ :enabled,
447
+ Telnyx::AI::Assistants::UpdateAssistant::ObservabilitySettings::Status::TaggedSymbol
448
+ )
449
+ DISABLED =
450
+ T.let(
451
+ :disabled,
452
+ Telnyx::AI::Assistants::UpdateAssistant::ObservabilitySettings::Status::TaggedSymbol
453
+ )
454
+
455
+ sig do
456
+ override.returns(
457
+ T::Array[
458
+ Telnyx::AI::Assistants::UpdateAssistant::ObservabilitySettings::Status::TaggedSymbol
459
+ ]
460
+ )
461
+ end
462
+ def self.values
463
+ end
464
+ end
465
+ end
334
466
  end
335
467
  end
336
468
  end
@@ -16,16 +16,18 @@ module Telnyx
16
16
  sig { returns(String) }
17
17
  attr_accessor :text
18
18
 
19
- # The duration of the audio file in seconds. This is only included if
20
- # `response_format` is set to `verbose_json`.
19
+ # The duration of the audio file in seconds. Returned by
20
+ # `distil-whisper/distil-large-v2` and `deepgram/nova-3` when `response_format` is
21
+ # `verbose_json`. Not returned by `openai/whisper-large-v3-turbo`.
21
22
  sig { returns(T.nilable(Float)) }
22
23
  attr_reader :duration
23
24
 
24
25
  sig { params(duration: Float).void }
25
26
  attr_writer :duration
26
27
 
27
- # Segments of the transcribed text and their corresponding details. This is only
28
- # included if `response_format` is set to `verbose_json`.
28
+ # Segments of the transcribed text and their corresponding details. Returned by
29
+ # `distil-whisper/distil-large-v2` when `response_format` is `verbose_json`. Not
30
+ # returned by `openai/whisper-large-v3-turbo`.
29
31
  sig do
30
32
  returns(
31
33
  T.nilable(
@@ -45,6 +47,32 @@ module Telnyx
45
47
  end
46
48
  attr_writer :segments
47
49
 
50
+ # Word-level timestamps and optional speaker labels. Only returned by
51
+ # `deepgram/nova-3` when word-level output is enabled via `model_config`.
52
+ sig do
53
+ returns(
54
+ T.nilable(
55
+ T::Array[Telnyx::Models::AI::AudioTranscribeResponse::Word]
56
+ )
57
+ )
58
+ end
59
+ attr_reader :words
60
+
61
+ sig do
62
+ params(
63
+ words:
64
+ T::Array[
65
+ Telnyx::Models::AI::AudioTranscribeResponse::Word::OrHash
66
+ ]
67
+ ).void
68
+ end
69
+ attr_writer :words
70
+
71
+ # Response fields vary by model. `distil-whisper/distil-large-v2` returns `text`,
72
+ # `duration`, and `segments` in `verbose_json` mode.
73
+ # `openai/whisper-large-v3-turbo` returns `text` only. `deepgram/nova-3` returns
74
+ # `text` and, depending on `model_config`, may include `words` with per-word
75
+ # timestamps and speaker labels.
48
76
  sig do
49
77
  params(
50
78
  text: String,
@@ -52,18 +80,27 @@ module Telnyx
52
80
  segments:
53
81
  T::Array[
54
82
  Telnyx::Models::AI::AudioTranscribeResponse::Segment::OrHash
83
+ ],
84
+ words:
85
+ T::Array[
86
+ Telnyx::Models::AI::AudioTranscribeResponse::Word::OrHash
55
87
  ]
56
88
  ).returns(T.attached_class)
57
89
  end
58
90
  def self.new(
59
91
  # The transcribed text for the audio file.
60
92
  text:,
61
- # The duration of the audio file in seconds. This is only included if
62
- # `response_format` is set to `verbose_json`.
93
+ # The duration of the audio file in seconds. Returned by
94
+ # `distil-whisper/distil-large-v2` and `deepgram/nova-3` when `response_format` is
95
+ # `verbose_json`. Not returned by `openai/whisper-large-v3-turbo`.
63
96
  duration: nil,
64
- # Segments of the transcribed text and their corresponding details. This is only
65
- # included if `response_format` is set to `verbose_json`.
66
- segments: nil
97
+ # Segments of the transcribed text and their corresponding details. Returned by
98
+ # `distil-whisper/distil-large-v2` when `response_format` is `verbose_json`. Not
99
+ # returned by `openai/whisper-large-v3-turbo`.
100
+ segments: nil,
101
+ # Word-level timestamps and optional speaker labels. Only returned by
102
+ # `deepgram/nova-3` when word-level output is enabled via `model_config`.
103
+ words: nil
67
104
  )
68
105
  end
69
106
 
@@ -73,7 +110,8 @@ module Telnyx
73
110
  text: String,
74
111
  duration: Float,
75
112
  segments:
76
- T::Array[Telnyx::Models::AI::AudioTranscribeResponse::Segment]
113
+ T::Array[Telnyx::Models::AI::AudioTranscribeResponse::Segment],
114
+ words: T::Array[Telnyx::Models::AI::AudioTranscribeResponse::Word]
77
115
  }
78
116
  )
79
117
  end
@@ -130,6 +168,81 @@ module Telnyx
130
168
  def to_hash
131
169
  end
132
170
  end
171
+
172
+ class Word < Telnyx::Internal::Type::BaseModel
173
+ OrHash =
174
+ T.type_alias do
175
+ T.any(
176
+ Telnyx::Models::AI::AudioTranscribeResponse::Word,
177
+ Telnyx::Internal::AnyHash
178
+ )
179
+ end
180
+
181
+ # End time of the word in seconds.
182
+ sig { returns(Float) }
183
+ attr_accessor :end_
184
+
185
+ # Start time of the word in seconds.
186
+ sig { returns(Float) }
187
+ attr_accessor :start
188
+
189
+ # The transcribed word.
190
+ sig { returns(String) }
191
+ attr_accessor :word
192
+
193
+ # Confidence score for the word (0.0 to 1.0).
194
+ sig { returns(T.nilable(Float)) }
195
+ attr_reader :confidence
196
+
197
+ sig { params(confidence: Float).void }
198
+ attr_writer :confidence
199
+
200
+ # Speaker index. Only present when diarization is enabled via `model_config`.
201
+ sig { returns(T.nilable(Integer)) }
202
+ attr_reader :speaker
203
+
204
+ sig { params(speaker: Integer).void }
205
+ attr_writer :speaker
206
+
207
+ # Word-level timing detail. Only present when using `deepgram/nova-3` with
208
+ # `model_config` options that enable word timestamps.
209
+ sig do
210
+ params(
211
+ end_: Float,
212
+ start: Float,
213
+ word: String,
214
+ confidence: Float,
215
+ speaker: Integer
216
+ ).returns(T.attached_class)
217
+ end
218
+ def self.new(
219
+ # End time of the word in seconds.
220
+ end_:,
221
+ # Start time of the word in seconds.
222
+ start:,
223
+ # The transcribed word.
224
+ word:,
225
+ # Confidence score for the word (0.0 to 1.0).
226
+ confidence: nil,
227
+ # Speaker index. Only present when diarization is enabled via `model_config`.
228
+ speaker: nil
229
+ )
230
+ end
231
+
232
+ sig do
233
+ override.returns(
234
+ {
235
+ end_: Float,
236
+ start: Float,
237
+ word: String,
238
+ confidence: Float,
239
+ speaker: Integer
240
+ }
241
+ )
242
+ end
243
+ def to_hash
244
+ end
245
+ end
133
246
  end
134
247
  end
135
248
  end
@@ -111,6 +111,21 @@ module Telnyx
111
111
  end
112
112
  attr_writer :messaging_settings
113
113
 
114
+ sig do
115
+ returns(
116
+ T.nilable(Telnyx::AI::InferenceEmbedding::ObservabilitySettings)
117
+ )
118
+ end
119
+ attr_reader :observability_settings
120
+
121
+ sig do
122
+ params(
123
+ observability_settings:
124
+ Telnyx::AI::InferenceEmbedding::ObservabilitySettings::OrHash
125
+ ).void
126
+ end
127
+ attr_writer :observability_settings
128
+
114
129
  sig { returns(T.nilable(Telnyx::AI::PrivacySettings)) }
115
130
  attr_reader :privacy_settings
116
131
 
@@ -192,6 +207,8 @@ module Telnyx
192
207
  insight_settings: Telnyx::AI::InsightSettings::OrHash,
193
208
  llm_api_key_ref: String,
194
209
  messaging_settings: Telnyx::AI::MessagingSettings::OrHash,
210
+ observability_settings:
211
+ Telnyx::AI::InferenceEmbedding::ObservabilitySettings::OrHash,
195
212
  privacy_settings: Telnyx::AI::PrivacySettings::OrHash,
196
213
  telephony_settings: Telnyx::AI::TelephonySettings::OrHash,
197
214
  tools:
@@ -250,6 +267,7 @@ module Telnyx
250
267
  # work with this integration.
251
268
  llm_api_key_ref: nil,
252
269
  messaging_settings: nil,
270
+ observability_settings: nil,
253
271
  privacy_settings: nil,
254
272
  telephony_settings: nil,
255
273
  # The tools that the assistant can use. These may be templated with
@@ -280,6 +298,8 @@ module Telnyx
280
298
  insight_settings: Telnyx::AI::InsightSettings,
281
299
  llm_api_key_ref: String,
282
300
  messaging_settings: Telnyx::AI::MessagingSettings,
301
+ observability_settings:
302
+ Telnyx::AI::InferenceEmbedding::ObservabilitySettings,
283
303
  privacy_settings: Telnyx::AI::PrivacySettings,
284
304
  telephony_settings: Telnyx::AI::TelephonySettings,
285
305
  tools: T::Array[Telnyx::AI::AssistantTool::Variants],
@@ -291,6 +311,116 @@ module Telnyx
291
311
  end
292
312
  def to_hash
293
313
  end
314
+
315
+ class ObservabilitySettings < Telnyx::Internal::Type::BaseModel
316
+ OrHash =
317
+ T.type_alias do
318
+ T.any(
319
+ Telnyx::AI::InferenceEmbedding::ObservabilitySettings,
320
+ Telnyx::Internal::AnyHash
321
+ )
322
+ end
323
+
324
+ sig { returns(T.nilable(String)) }
325
+ attr_reader :host
326
+
327
+ sig { params(host: String).void }
328
+ attr_writer :host
329
+
330
+ sig { returns(T.nilable(String)) }
331
+ attr_reader :public_key_ref
332
+
333
+ sig { params(public_key_ref: String).void }
334
+ attr_writer :public_key_ref
335
+
336
+ sig { returns(T.nilable(String)) }
337
+ attr_reader :secret_key_ref
338
+
339
+ sig { params(secret_key_ref: String).void }
340
+ attr_writer :secret_key_ref
341
+
342
+ sig do
343
+ returns(
344
+ T.nilable(
345
+ Telnyx::AI::InferenceEmbedding::ObservabilitySettings::Status::TaggedSymbol
346
+ )
347
+ )
348
+ end
349
+ attr_reader :status
350
+
351
+ sig do
352
+ params(
353
+ status:
354
+ Telnyx::AI::InferenceEmbedding::ObservabilitySettings::Status::OrSymbol
355
+ ).void
356
+ end
357
+ attr_writer :status
358
+
359
+ sig do
360
+ params(
361
+ host: String,
362
+ public_key_ref: String,
363
+ secret_key_ref: String,
364
+ status:
365
+ Telnyx::AI::InferenceEmbedding::ObservabilitySettings::Status::OrSymbol
366
+ ).returns(T.attached_class)
367
+ end
368
+ def self.new(
369
+ host: nil,
370
+ public_key_ref: nil,
371
+ secret_key_ref: nil,
372
+ status: nil
373
+ )
374
+ end
375
+
376
+ sig do
377
+ override.returns(
378
+ {
379
+ host: String,
380
+ public_key_ref: String,
381
+ secret_key_ref: String,
382
+ status:
383
+ Telnyx::AI::InferenceEmbedding::ObservabilitySettings::Status::TaggedSymbol
384
+ }
385
+ )
386
+ end
387
+ def to_hash
388
+ end
389
+
390
+ module Status
391
+ extend Telnyx::Internal::Type::Enum
392
+
393
+ TaggedSymbol =
394
+ T.type_alias do
395
+ T.all(
396
+ Symbol,
397
+ Telnyx::AI::InferenceEmbedding::ObservabilitySettings::Status
398
+ )
399
+ end
400
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
401
+
402
+ ENABLED =
403
+ T.let(
404
+ :enabled,
405
+ Telnyx::AI::InferenceEmbedding::ObservabilitySettings::Status::TaggedSymbol
406
+ )
407
+ DISABLED =
408
+ T.let(
409
+ :disabled,
410
+ Telnyx::AI::InferenceEmbedding::ObservabilitySettings::Status::TaggedSymbol
411
+ )
412
+
413
+ sig do
414
+ override.returns(
415
+ T::Array[
416
+ Telnyx::AI::InferenceEmbedding::ObservabilitySettings::Status::TaggedSymbol
417
+ ]
418
+ )
419
+ end
420
+ def self.values
421
+ end
422
+ end
423
+ end
294
424
  end
295
425
  end
296
426
  end
@@ -345,6 +345,14 @@ module Telnyx
345
345
  end
346
346
  attr_writer :channels
347
347
 
348
+ # Whether call recording is enabled. When set to false, calls will not be recorded
349
+ # regardless of other recording configuration.
350
+ sig { returns(T.nilable(T::Boolean)) }
351
+ attr_reader :enabled
352
+
353
+ sig { params(enabled: T::Boolean).void }
354
+ attr_writer :enabled
355
+
348
356
  # The format of the recording file.
349
357
  sig do
350
358
  returns(
@@ -368,6 +376,7 @@ module Telnyx
368
376
  params(
369
377
  channels:
370
378
  Telnyx::AI::TelephonySettings::RecordingSettings::Channels::OrSymbol,
379
+ enabled: T::Boolean,
371
380
  file_format:
372
381
  Telnyx::AI::TelephonySettings::RecordingSettings::Format::OrSymbol
373
382
  ).returns(T.attached_class)
@@ -375,6 +384,9 @@ module Telnyx
375
384
  def self.new(
376
385
  # The number of channels for the recording. 'single' for mono, 'dual' for stereo.
377
386
  channels: nil,
387
+ # Whether call recording is enabled. When set to false, calls will not be recorded
388
+ # regardless of other recording configuration.
389
+ enabled: nil,
378
390
  # The format of the recording file.
379
391
  file_format: nil
380
392
  )
@@ -385,6 +397,7 @@ module Telnyx
385
397
  {
386
398
  channels:
387
399
  Telnyx::AI::TelephonySettings::RecordingSettings::Channels::OrSymbol,
400
+ enabled: T::Boolean,
388
401
  file_format:
389
402
  Telnyx::AI::TelephonySettings::RecordingSettings::Format::OrSymbol
390
403
  }